From 0c75247f7332b5b1debb99df0127b1bc8a6e707c Mon Sep 17 00:00:00 2001 From: Patrick Norton Date: Mon, 24 Nov 2025 19:03:26 -0500 Subject: [PATCH] gnu: Add go-storj-io-drpc. * gnu/packages/golang-web.scm (gnu-storj-io-drpc, protoc-gen-go-drpc): New variables. Change-Id: Id55ef7d3888d52f4002ce89ecc6ddd5992cf57c5 Co-authored-by: Sharlatan Hellseher Signed-off-by: Sharlatan Hellseher --- gnu/packages/golang-web.scm | 72 +++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm index 388e27604c18c3b2081cbcba62ae3b87db93f792..dab4167d8f312fb4c09ef5570451729f682c0342 100644 --- a/gnu/packages/golang-web.scm +++ b/gnu/packages/golang-web.scm @@ -16712,6 +16712,60 @@ support arbitrary use cases, but instead specifically focuses on supporting Kubernetes components which are using nftables.") (license license:asl2.0))) +(define-public go-storj-io-drpc + (package + (name "go-storj-io-drpc") + (version "0.0.34") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/storj/drpc") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14lqij58nj8m84mbad1nv30s2v33l2zbw3nvc903f7bl43rgwdl6")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Submodules with their own go.mod files and packaged separately: + ;; + ;; - storj.io/drpc/internal/backcompat + ;; - storj.io/drpc/internal/backcompat/newservice + ;; - storj.io/drpc/internal/backcompat/newservicedefs + ;; - storj.io/drpc/internal/backcompat/oldservice + ;; - storj.io/drpc/internal/backcompat/oldservicedefs + ;; - storj.io/drpc/internal/backcompat/servicedefs + ;; - storj.io/drpc/internal/grpccompat + ;; - storj.io/drpc/internal/integration + ;; - storj.io/drpc/internal/twirpcompat + (for-each delete-file-recursively + (list "internal/backcompat" + "internal/grpccompat" + "internal/integration" + "internal/twirpcompat")))))) + (build-system go-build-system) + (arguments + (list + #:import-path "storj.io/drpc" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-examples + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (delete-file-recursively "examples"))))))) + (native-inputs + (list go-github-com-zeebo-assert)) + (propagated-inputs + (list go-google-golang-org-protobuf + go-github-com-zeebo-errs)) + (home-page "https://storj.io/drpc") + (synopsis "Lightweight, drop-in replacement for gRPC") + (description + "This package is a light, drop-in replacement for gRPC, a Remote +Procedure Call (RPC) framework.") + (license license:expat))) + ;;; ;;; Executables: ;;; @@ -16886,6 +16940,24 @@ go-github-com-tdewolff-minify-v2 source."))) the TLS @acronym{SNI, Server Name Indication} of the TLS handshake. It carries no encryption keys and cannot decode the traffic that it proxies."))) +(define-public protoc-gen-go-drpc + (package/inherit go-storj-io-drpc + (name "protoc-gen-go-drpc") + (arguments + (substitute-keyword-arguments + (package-arguments go-storj-io-drpc) + ((#:install-source? _ #t) #f) + ((#:skip-build? _ #t) #f) + ((#:tests? _ #t) #f) + ((#:import-path _) "storj.io/drpc/cmd/protoc-gen-go-drpc") + ((#:unpack-path _ "") "storj.io/drpc") + ((#:phases phases) + #~(modify-phases #$phases + (delete 'remove-examples))))) + (native-inputs (package-propagated-inputs go-storj-io-drpc)) + (propagated-inputs '()) + (inputs '()))) + (define-public protoc-gen-go-grpc (package/inherit go-google-golang-org-grpc-cmd-protoc-gen-go-grpc (name "protoc-gen-go-grpc")