[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: |
Sat, 9 Nov 2024 16:44:51 -0500 (EST) |
sharlatan pushed a commit to branch master
in repository guix.
commit 449fa18bf60907a7625ff6eeb037ecbb3a00be77
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
- 19/172: gnu: go-1.20: Build with gccgo-12 on some systems., (continued)
- 19/172: gnu: go-1.20: Build with gccgo-12 on some systems., guix-commits, 2024/11/09
- 20/172: build-system/go: Add subdir parameter to go-version->git-ref., guix-commits, 2024/11/09
- 21/172: import/go: Account for monorepo modules in the Go importer., guix-commits, 2024/11/09
- 36/172: gnu: go-github-com-golang-groupcache: Fix indentation., guix-commits, 2024/11/09
- 29/172: gnu: go-golang-org-x-text: Update to 0.18.0., guix-commits, 2024/11/09
- 23/172: gnu: packages/golang-crypto: Apply #:subdir parameter., guix-commits, 2024/11/09
- 31/172: gnu: go-golang-org-x-xerrors: Fix indentation., guix-commits, 2024/11/09
- 24/172: gnu: go-golang-org-x-image: Update to 0.20.0., guix-commits, 2024/11/09
- 38/172: gnu: go-github-com-libp2p-go-msgio: Fix build., guix-commits, 2024/11/09
- 25/172: gnu: go-golang-org-x-mod: Update to 0.21.0., guix-commits, 2024/11/09
- 42/172: gnu: go-github-com-prometheus-exporter-toolkit: Fix build.,
guix-commits <=
- 46/172: gnu: kubo: Fix build., guix-commits, 2024/11/09
- 52/172: gnu: go-mvdan-cc-xurls: Rename variable., guix-commits, 2024/11/09
- 44/172: gnu: go-github-com-ipfs-go-ds-badger: Fix build., guix-commits, 2024/11/09
- 51/172: gnu: go-github-com-google-go-cmdtest: Fix indentation, guix-commits, 2024/11/09
- 56/172: gnu: go-golang-org-x-vuln: Move to golang-build., guix-commits, 2024/11/09
- 64/172: gnu: go-github-com-google-go-querystring: Move to golang-web., guix-commits, 2024/11/09
- 60/172: gnu: go-github-com-sergi-go-diff: Update to 1.3.1., guix-commits, 2024/11/09
- 61/172: gnu: go-golang-org-x-crypto: Update to 0.27.0., guix-commits, 2024/11/09
- 66/172: gnu: go-github-com-google-goterm: Fix indentation., guix-commits, 2024/11/09
- 68/172: gnu: go-github-com-tomnomnom-gron: Improve package style., guix-commits, 2024/11/09