From 43af1877a8915a84d650d1f4fbb8d2a47af92548 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Wed, 22 Oct 2025 17:07:14 +0100 Subject: [PATCH] gnu: Add go-github-com-planetscale-vtprotobuf. * gnu/packages/golang-web.scm (go-github-com-planetscale-vtprotobuf) (protoc-gen-go-vtproto): New variables. Change-Id: I505a6d74dd41160ed7226de24d6ad685c2c996ec Reviewed-by: Arthur Rodrigues --- gnu/packages/golang-web.scm | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm index 3bc425c183fa5b3bcb7e15b5373937c558967d26..6d73d2df9426a85b697eb84f174a8377c78208af 100644 --- a/gnu/packages/golang-web.scm +++ b/gnu/packages/golang-web.scm @@ -10001,6 +10001,42 @@ implementation, as described in for Go.") (license license:bsd-2))) +(define-public go-github-com-planetscale-vtprotobuf + (package + (name "go-github-com-planetscale-vtprotobuf") + (version "0.4.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/planetscale/vtprotobuf") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0qd76dcy5ij49cvrqjnbr9smfkhzrl2s9czx9kz5g3530nhrgn2s")))) + (build-system go-build-system) + (arguments + (list + #:skip-build? #t + #:import-path "github.com/planetscale/vtprotobuf" + #:test-flags + ;; TODO: Generate proto files to complete tests, see Makefile. + ;; conformance_test.go:56: execution error: fork/exec + ;; conformance/conformance-test-runner: no such file or directory + #~(list "-skip" "Test"))) + (native-inputs + (list go-github-com-stretchr-testify)) + (propagated-inputs + (list go-google-golang-org-grpc + go-google-golang-org-protobuf)) + (home-page "https://github.com/planetscale/vtprotobuf") + (synopsis "Protocol Buffers compiler for ProtoBuf APIv2 Golang code") + (description + "This package provides @@code{protoc-gen-go-vtproto} plug-in for +@code{protoc}, which is used by Vitess to generate optimized marshall & +unmarshal code.") + (license license:bsd-3))) + (define-public go-github-com-pquerna-cachecontrol (package (name "go-github-com-pquerna-cachecontrol") @@ -14538,6 +14574,23 @@ carries no encryption keys and cannot decode the traffic that it proxies."))) (propagated-inputs '()) (inputs '()))) +(define-public protoc-gen-go-vtproto + (package/inherit go-github-com-planetscale-vtprotobuf + (name "protoc-gen-go-vtproto") + (arguments + (substitute-keyword-arguments + (package-arguments go-github-com-planetscale-vtprotobuf) + ((#:install-source? _ #t) #f) + ((#:skip-build? _ #t) #f) + ((#:tests? _ #t) #f) + ((#:import-path _) + "github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto") + ((#:unpack-path _ "") "github.com/planetscale/vtprotobuf"))) + (native-inputs (package-propagated-inputs + go-github-com-planetscale-vtprotobuf)) + (propagated-inputs '()) + (inputs '()))) + (define-public swag (package/inherit go-github-com-swaggo-swag (name "swag")