Subject: [bug#62284] [PATCH v2 06/71] gnu: Add go-google-golang-org-protobuf-package.

From: Miguel Ángel Moreno <[email-masked]>
Date: Sun, 11 Feb 2024 22:03:33 +0100

* gnu/packages/golang.scm (go-google-golang-org-protobuf-package): New procedure.

Change-Id: I334d50c33c3ba03efcc59ba969536d21aeed064d
---
 gnu/packages/golang.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index c2ff8d6d2d..933aed82e3 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7761,6 +7761,17 @@ (define-public go-github-com-macronut-go-tproxy
 Proxy functionality.")
     (license license:expat)))
 
+(define (go-google-golang-org-protobuf-package suffix)
+  (package
+    (inherit go-google-golang-org-protobuf)
+    (name (string-append "go-google-golang-org-protobuf-" suffix))
+    (arguments
+     (substitute-keyword-arguments
+         (package-arguments go-google-golang-org-protobuf)
+       ((#:import-path path)
+        (string-append path "/"
+                       (string-replace-substring suffix "-" "/")))))))
+
 (define-public go-github-com-mattn-go-zglob
   (package
     (name "go-github-com-mattn-go-zglob")
-- 
2.41.0

-- 
Best regards,
Miguel Ángel Moreno