summaryrefslogtreecommitdiff
path: root/gnu/packages/prometheus.scm
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-12-27 16:07:13 +0000
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-01-21 23:42:29 +0000
commit2557dee20f4e99d775ef3ad7c6faa5b0598e3c27 (patch)
treee384d04edaf1abd96130994a06e601bb053a87a0 /gnu/packages/prometheus.scm
parent0440821acf2ba9d63761f861d690bb7498603ed0 (diff)
gnu: go-github-com-prometheus-client-golang: Update to 1.20.5.
* gnu/packages/prometheus.scm: Add golang-compression module. (go-github-com-prometheus-client-golang): Update to 1.20.5. [source]: Delete submodules with their own go.mod files to fix build. [arguments] <phases>: Use default 'check. <test-flags>: Skip one test. [propagated-inputs]: Remove go-github-com-davecgh-go-spew; add go-github-com-google-go-cmp, go-github-com-klauspost-compress, and go-github-com-kylelemons-godebug. Change-Id: Ib6a605c6ebfbdf0fa2fa3a554cfaa6532e2a957d
Diffstat (limited to 'gnu/packages/prometheus.scm')
-rw-r--r--gnu/packages/prometheus.scm30
1 files changed, 19 insertions, 11 deletions
diff --git a/gnu/packages/prometheus.scm b/gnu/packages/prometheus.scm
index c498c270302..26a85eb81c9 100644
--- a/gnu/packages/prometheus.scm
+++ b/gnu/packages/prometheus.scm
@@ -34,6 +34,7 @@
34 #:use-module (gnu packages) 34 #:use-module (gnu packages)
35 #:use-module (gnu packages golang-build) 35 #:use-module (gnu packages golang-build)
36 #:use-module (gnu packages golang-check) 36 #:use-module (gnu packages golang-check)
37 #:use-module (gnu packages golang-compression)
37 #:use-module (gnu packages golang-crypto) 38 #:use-module (gnu packages golang-crypto)
38 #:use-module (gnu packages golang-web) 39 #:use-module (gnu packages golang-web)
39 #:use-module (gnu packages golang-xyz)) 40 #:use-module (gnu packages golang-xyz))
@@ -129,7 +130,7 @@ registry.")
129(define-public go-github-com-prometheus-client-golang 130(define-public go-github-com-prometheus-client-golang
130 (package 131 (package
131 (name "go-github-com-prometheus-client-golang") 132 (name "go-github-com-prometheus-client-golang")
132 (version "1.19.1") 133 (version "1.20.5")
133 (source 134 (source
134 (origin 135 (origin
135 (method git-fetch) 136 (method git-fetch)
@@ -138,15 +139,27 @@ registry.")
138 (commit (string-append "v" version)))) 139 (commit (string-append "v" version))))
139 (file-name (git-file-name name version)) 140 (file-name (git-file-name name version))
140 (sha256 141 (sha256
141 (base32 "0mx5q221pbkx081ycf1lp8sxz513220ya8qczkkvab943cwlcarv")))) 142 (base32 "1q3n22p5ic22xzha6mffh0m0jzbxrkyjrcmnxsnanl61jwb4rkpw"))
143 (modules '((guix build utils)))
144 (snippet
145 #~(begin
146 ;; Submodules with their own go.mod files and packaged separately:
147 ;;
148 ;; - dagger
149 ;; - .bingo - fake module
150 (delete-file-recursively "dagger")
151 (delete-file-recursively ".bingo")))))
142 (build-system go-build-system) 152 (build-system go-build-system)
143 (arguments 153 (arguments
144 (list 154 (list
155 #:skip-build? #t
145 ;; XXX: Check if the most of the tests may be enabled: 156 ;; XXX: Check if the most of the tests may be enabled:
146 ;; api/prometheus/v1/api_test.go:1063:23: cannot use 1634644800304 157 ;; api/prometheus/v1/api_test.go:1063:23: cannot use 1634644800304
147 ;; (untyped int constant) as int value in map literal (overflows) 158 ;; (untyped int constant) as int value in map literal (overflows)
148 #:tests? (target-64bit?) 159 #:tests? (target-64bit?)
149 #:import-path "github.com/prometheus/client_golang" 160 #:import-path "github.com/prometheus/client_golang"
161 ;; Assertion fails in one test.
162 #:test-flags #~(list "-skip" "TestHandler")
150 #:phases 163 #:phases
151 #~(modify-phases %standard-phases 164 #~(modify-phases %standard-phases
152 (add-after 'unpack 'remove-examples-and-tutorials 165 (add-after 'unpack 'remove-examples-and-tutorials
@@ -155,19 +168,14 @@ registry.")
155 (for-each delete-file-recursively 168 (for-each delete-file-recursively
156 (list "api/prometheus/v1/example_test.go" 169 (list "api/prometheus/v1/example_test.go"
157 "examples" 170 "examples"
158 "tutorial"))))) 171 "tutorials"))))))))
159 ;; XXX: Workaround for go-build-system's lack of Go modules support.
160 (delete 'build)
161 (replace 'check
162 (lambda* (#:key tests? import-path #:allow-other-keys)
163 (when tests?
164 (with-directory-excursion (string-append "src/" import-path)
165 (invoke "go" "test" "-v" "./..."))))))))
166 (propagated-inputs 172 (propagated-inputs
167 (list go-github-com-beorn7-perks 173 (list go-github-com-beorn7-perks
168 go-github-com-cespare-xxhash-v2 174 go-github-com-cespare-xxhash-v2
169 go-github-com-davecgh-go-spew 175 go-github-com-google-go-cmp
170 go-github-com-json-iterator-go 176 go-github-com-json-iterator-go
177 go-github-com-klauspost-compress
178 go-github-com-kylelemons-godebug
171 go-github-com-prometheus-client-model 179 go-github-com-prometheus-client-model
172 go-github-com-prometheus-common 180 go-github-com-prometheus-common
173 go-github-com-prometheus-procfs 181 go-github-com-prometheus-procfs