diff options
Diffstat (limited to 'gnu/packages/golang.scm')
-rw-r--r-- | gnu/packages/golang.scm | 71 |
1 files changed, 46 insertions, 25 deletions
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index b4ea1c83e1..273cc092de 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org> ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr> ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz> -;;; Copyright © 2018, 2019, 2020, 2023 Katherine Cox-Buday <cox.katherine.e@gmail.com> +;;; Copyright © 2018, 2019, 2020, 2023, 2024 Katherine Cox-Buday <cox.katherine.e@gmail.com> ;;; Copyright © 2019 Giovanni Biscuolo <g@xelera.eu> ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com> ;;; Copyright © 2019, 2020, 2021 Arun Isaac <arunisaac@systemreboot.net> @@ -972,7 +972,13 @@ in the style of communicating sequential processes (@dfn{CSP}).") ;; to perl input in sourcecode generators and test scripts (substitute* (find-files "src" "\\.pl$") (("^#!.*") - "#!/usr/bin/env perl\n")))))))) + "#!/usr/bin/env perl\n")))) + (add-after 'unpack 'remove-flakey-thread-sanitizer-tests + (lambda _ + ;; These tests have been identified as flakey: + ;; https://github.com/golang/go/issues/66427 + (substitute* "src/cmd/cgo/internal/testsanitizers/tsan_test.go" + ((".*tsan1[34].*") "")))))))) (native-inputs ;; Go 1.22 and later requires Go 1.20 (min. 1.20.6, which we don't have) ;; as the bootstrap toolchain. @@ -6226,7 +6232,7 @@ test when a comparison fails.") '(#:import-path "gotest.tools/gotestsum")) (native-inputs (list go-github-com-fatih-color - go-golang.org-x-sync-errgroup + go-golang-org-x-sync go-github-com-pkg-errors go-github-com-sirupsen-logrus go-github-com-spf13-pflag @@ -6248,25 +6254,34 @@ test results.") (home-page "https://github.com/gotestyourself/gotestsum") (license license:asl2.0))) -(define-public go-github-com-golang-protobuf-proto +(define-public go-github-com-golang-protobuf (package - (name "go-github-com-golang-protobuf-proto") - (version "1.3.1") + (name "go-github-com-golang-protobuf") + (version "1.5.3") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/golang/protobuf") - (commit (string-append "v" version)))) + (url "https://github.com/golang/protobuf") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "15am4s4646qy6iv0g3kkqq52rzykqjhm4bf08dk0fy2r58knpsyl")))) + "03f1w2cd4s8a3xhl61x7yjx81kbzlrjpvnnwmbhqnz814yi7h43i")))) (build-system go-build-system) (arguments - '(#:import-path "github.com/golang/protobuf/proto" - #:unpack-path "github.com/golang/protobuf" - ;; Requires unpackaged golang.org/x/sync/errgroup - #:tests? #f)) + (list #:import-path "github.com/golang/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-google-golang-org-protobuf)) (synopsis "Go support for Protocol Buffers") (description "This package provides Go support for the Protocol Buffers data serialization format.") @@ -6276,7 +6291,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 @@ -6285,16 +6300,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 @@ -7750,7 +7771,7 @@ formatting information, rather than the current locale name.") ;; Source-only package (delete 'build)))) (propagated-inputs - (list go-github-com-golang-protobuf-proto + (list go-github-com-golang-protobuf go-github-com-matttproud-golang-protobuf-extensions-pbutil go-github-com-prometheus-client-model)) (synopsis "Prometheus metrics") @@ -7778,7 +7799,7 @@ Prometheus metrics.") ;; The tests require Go modules, which are not yet supported in Guix's ;; Go build system. #:tests? #f)) - (propagated-inputs (list go-golang.org-x-sync-errgroup)) + (propagated-inputs (list go-golang-org-x-sync)) (synopsis "Go library for reading @file{/proc}") (description "The @code{procfs} Go package provides functions to retrieve system, kernel, and process metrics from the @file{/proc} pseudo file system.") @@ -7808,7 +7829,7 @@ system, kernel, and process metrics from the @file{/proc} pseudo file system.") (delete 'build)))) (propagated-inputs (list go-github-com-beorn7-perks-quantile - go-github-com-golang-protobuf-proto + go-github-com-golang-protobuf go-github-com-prometheus-client-model go-github-com-prometheus-common go-github-com-prometheus-procfs |