aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/prometheus.scm
diff options
context:
space:
mode:
authorLeo Nikkilä <hello@lnikki.la>2024-08-25 12:05:27 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-08-25 20:46:48 +0100
commit81ff6e5e64f46dc4741c81bb973054d7e65b0dec (patch)
tree217717682c3e322288059ddead5e3d5385a02476 /gnu/packages/prometheus.scm
parent6d508ef6905a17d269fe53532dd5009fff77ffb6 (diff)
downloadguix-81ff6e5e64f46dc4741c81bb973054d7e65b0dec.tar.gz
guix-81ff6e5e64f46dc4741c81bb973054d7e65b0dec.zip
gnu: Add go-github-com-prometheus-exporter-toolkit.
* gnu/packages/prometheus.scm (go-github-com-prometheus-exporter-toolkit): New variable. Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com> Change-Id: I89d3a28a1f8ceab9ec3e8754582b2292205b3772
Diffstat (limited to 'gnu/packages/prometheus.scm')
-rw-r--r--gnu/packages/prometheus.scm49
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/prometheus.scm b/gnu/packages/prometheus.scm
index 5ed3acaeb3..5efa5e567e 100644
--- a/gnu/packages/prometheus.scm
+++ b/gnu/packages/prometheus.scm
@@ -333,6 +333,55 @@ using Amazon's Signature Verification V4 signing procedure, using credentials
from the default AWS credential chain.")
(license license:asl2.0)))
+(define-public go-github-com-prometheus-exporter-toolkit
+ (package
+ (name "go-github-com-prometheus-exporter-toolkit")
+ (version "0.11.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/prometheus/exporter-toolkit")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1n46jw3b13g355iv8phxxnnci7a877y5dscc1rlj3rpz4vy6yfzx"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #: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")))))
+ ;; 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-alecthomas-kingpin-v2
+ go-github-com-coreos-go-systemd-v22
+ go-github-com-go-kit-log
+ ; Imported for go-github-com-prometheus-common to break the cycle.
+ go-github-com-prometheus-client-golang
+ go-github-com-prometheus-common
+ go-golang-org-x-crypto
+ go-golang-org-x-sync
+ go-gopkg-in-yaml-v2))
+ (home-page "https://github.com/prometheus/exporter-toolkit")
+ (synopsis "Utility package to build Prometheus exporters")
+ (description
+ "This package provides tooling to build Prometheus exporters")
+ (license license:asl2.0)))
+
(define-public go-github-com-prometheus-procfs
(package
(name "go-github-com-prometheus-procfs")