sharlatan pushed a commit to branch master
in repository guix.

commit 3da36f50a1284d75e1e575441b6d19d8cd5235a1
Author: Hilton Chain <hako@ultrarare.space>
AuthorDate: Fri Jan 26 01:13:17 2024 +0800

    gnu: go-google-golang-org-protobuf: Update to 1.31.0.
    
    * gnu/packages/golang.scm (go-google-golang-org-protobuf): Update to 1.31.0.
    [arguments]: <#:phases>: Remove 'build phase. Add custom 'check phase.
    [propagated-inputs]: Remove go-github-com-golang-protobuf-proto.
    
    Co-authored-by: Sharlatan Hellseher <sharlata...@gmail.com>
    Signed-off-by: Sharlatan Hellseher <sharlata...@gmail.com>
    Change-Id: Iba7fe94b2a2fa245e24d17affa5edb1531ac835b
---
 gnu/packages/golang.scm | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 1e9a4efc31..8705f47c6d 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6257,7 +6257,7 @@ data serialization format.")
 (define-public go-google-golang-org-protobuf
   (package
     (name "go-google-golang-org-protobuf")
-    (version "1.28.0")
+    (version "1.31.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -6266,16 +6266,22 @@ data serialization format.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1nzcc4qc00afi24nb7nlnwyzvvr6b8s8qdrn1sw085nygh2y2x8r"))))
+                "1xf18kzz96hgfy1vlbnydrizzpxkqj2iamfdbj3dx5a1zz5mi8n0"))))
     (build-system go-build-system)
     (arguments
-     (list #:import-path "google.golang.org/protobuf"
-           #:tests? #f ; source-only package
-           #:phases #~(modify-phases %standard-phases
-                        ;; source-only package
-                        (delete 'build))))
-    (propagated-inputs (list go-github-com-google-go-cmp-cmp
-                             go-github-com-golang-protobuf-proto))
+     (list #:go go-1.21
+           #:import-path "google.golang.org/protobuf"
+           #:phases
+           #~(modify-phases %standard-phases
+               ;; XXX: Workaround for go-build-system's lack of Go modules
+               ;; support.
+               (delete 'build)
+               (replace 'check
+                 (lambda* (#:key tests? import-path #:allow-other-keys)
+                   (when tests?
+                     (with-directory-excursion (string-append "src/" 
import-path)
+                       (invoke "go" "test" "-v" "./..."))))))))
+    (propagated-inputs (list go-github-com-google-go-cmp-cmp))
     (home-page "https://google.golang.org/protobuf";)
     (synopsis "Go library for Protocol Buffers")
     (description

Reply via email to