[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
42/172: gnu: go-github-com-prometheus-exporter-toolkit: Fix build.
From: |
guix-commits |
Subject: |
42/172: gnu: go-github-com-prometheus-exporter-toolkit: Fix build. |
Date: |
Tue, 5 Nov 2024 16:04:52 -0500 (EST) |
sharlatan pushed a commit to branch go-team
in repository guix.
commit 385816d873081c0591802badea4a9b809793df76
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Fri Sep 13 22:00:22 2024 +0100
gnu: go-github-com-prometheus-exporter-toolkit: Fix build.
* gnu/packages/prometheus.scm (go-github-com-prometheus-exporter-toolkit):
Fix build
[arguments]: <#:phases>: Add 'fix-embed-editions-defaults-binpb phase;
remove 'disable-failing-tests in favor of "-skip" test flags.
[native-inputs]: Add go-google-golang-org-protobuf.
Change-Id: If573aa261adc3a136a4907267d1427a9f9cfb4d9
---
gnu/packages/prometheus.scm | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/prometheus.scm b/gnu/packages/prometheus.scm
index 6204eba5df..c3267a234b 100644
--- a/gnu/packages/prometheus.scm
+++ b/gnu/packages/prometheus.scm
@@ -405,20 +405,33 @@ from the default AWS credential chain.")
#:import-path "github.com/prometheus/exporter-toolkit"
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'disable-failing-tests
- (lambda* (#:key tests? import-path #:allow-other-keys)
- (with-directory-excursion (string-append "src/" import-path)
- (substitute* (find-files "." "\\_test.go$")
- ;; Some tests require network set up.
- (("TestServerBehaviour") "OffTestServerBehaviour")
- (("TestConfigReloading") "OffTestConfigReloading")))))
+ (add-after 'unpack 'fix-embed-editions-defaults-binpb
+ (lambda _
+ (let* ((import-path "google.golang.org/protobuf")
+ (subdir "internal/editiondefaults")
+ (embed-file "editions_defaults.binpb")
+ (embed-file-path
+ (string-append "src/"
+ import-path "/"
+ subdir "/"
+ embed-file)))
+ (delete-file-recursively embed-file-path)
+ (copy-file
+ (string-append
+ #$(this-package-native-input "go-google-golang-org-protobuf")
+ "/" embed-file-path)
+ embed-file-path))))
;; 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" "./..."))))))))
+ (invoke "go" "test" "-v"
+ "-skip" "TestServerBehaviour|TestConfigReloading"
+ "./..."))))))))
+ (native-inputs
+ (list go-google-golang-org-protobuf))
(propagated-inputs
(list go-github-com-alecthomas-kingpin-v2
go-github-com-coreos-go-systemd-v22
- 49/172: gnu: Add go-golang-org-x-telemetry-config., (continued)
- 49/172: gnu: Add go-golang-org-x-telemetry-config., guix-commits, 2024/11/05
- 22/172: import/go: Add diagnostics., guix-commits, 2024/11/05
- 18/172: gnu: go-1.23: Update to 1.23.1., guix-commits, 2024/11/05
- 37/172: gnu: go-github-com-golang-groupcache: Fix build., guix-commits, 2024/11/05
- 45/172: gnu: go-github-com-libp2p-go-libp2p: Fix build., guix-commits, 2024/11/05
- 50/172: gnu: go-github-com-google-go-cmdtest: Update to 0.4.0., guix-commits, 2024/11/05
- 30/172: gnu: go-golang-org-x-xerrors: Update to 0.0.0-20200804184101-5ec99f83aff1., guix-commits, 2024/11/05
- 46/172: gnu: kubo: Fix build., guix-commits, 2024/11/05
- 51/172: gnu: go-github-com-google-go-cmdtest: Fix indentation, guix-commits, 2024/11/05
- 44/172: gnu: go-github-com-ipfs-go-ds-badger: Fix build., guix-commits, 2024/11/05
- 42/172: gnu: go-github-com-prometheus-exporter-toolkit: Fix build.,
guix-commits <=
- 31/172: gnu: go-golang-org-x-xerrors: Fix indentation., guix-commits, 2024/11/05
- 35/172: gnu: go-github-com-golang-groupcache: Update to 0.0.0-20210331224755-41bb18bfe9da., guix-commits, 2024/11/05
- 41/172: gnu: go-github-com-prometheus-client-golang: Fix build., guix-commits, 2024/11/05
- 56/172: gnu: go-golang-org-x-vuln: Move to golang-build., guix-commits, 2024/11/05
- 52/172: gnu: go-mvdan-cc-xurls: Rename variable., guix-commits, 2024/11/05
- 59/172: gnu: Remove go-github-com-jba-printsrc., guix-commits, 2024/11/05
- 62/172: gnu: go-github-com-google-go-querystring: Update to 1.1.0., guix-commits, 2024/11/05
- 65/172: gnu: go-github-com-google-goterm: Update to 0.0.0-20200907032337-555d40f16ae2., guix-commits, 2024/11/05
- 67/172: gnu: go-github-com-google-goterm: Move to golang-xyz., guix-commits, 2024/11/05
- 68/172: gnu: go-github-com-tomnomnom-gron: Improve package style., guix-commits, 2024/11/05