diff options
author | Sharlatan Hellseher <[email protected]> | 2024-07-25 10:24:15 +0100 |
---|---|---|
committer | Sharlatan Hellseher <[email protected]> | 2024-07-25 21:01:03 +0100 |
commit | 7053ef0aaebcf1bc7a4205baccea973807ddae6f (patch) | |
tree | 5492b194229c80b2c3fec0ccf707ef399bbcb4a4 /gnu/packages/prometheus.scm | |
parent | 10b868c0a7d5fdb9edc68b0d56b64723e664af14 (diff) |
gnu: go-github-com-prometheus-client-golang: Move to prometheus.
* gnu/packages/golang.scm (go-github-com-prometheus-client-golang): Move
from here ...
* gnu/packages/prometheus.scm: ... to here.
* gnu/packages/backup.scm: Add (gnu packages prometheus) module.
* gnu/packages/golang-xyz.scm: Likewise.
* gnu/packages/ipfs.scm: Likewise.
* gnu/packages/irc.scm: Likewise.
* gnu/packages/web.scm: Likewise.
Change-Id: If3d78d31b1491f8a95616e59f50371c2914242d9
Diffstat (limited to 'gnu/packages/prometheus.scm')
-rw-r--r-- | gnu/packages/prometheus.scm | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/prometheus.scm b/gnu/packages/prometheus.scm index 5ec4fe0b12..860bb74017 100644 --- a/gnu/packages/prometheus.scm +++ b/gnu/packages/prometheus.scm @@ -29,6 +29,7 @@ #:use-module (gnu packages golang) #:use-module (gnu packages golang-build) #:use-module (gnu packages golang-check) + #:use-module (gnu packages golang-crypto) #:use-module (gnu packages golang-web) #:use-module (gnu packages golang-xyz)) @@ -87,6 +88,56 @@ x/net/trace)} tracing wrappers @code{net.Conn}, both inbound (@@code{net.Listener}) and outbound (@@code{net.Dialer}).") (license license:asl2.0))) +(define-public go-github-com-prometheus-client-golang + (package + (name "go-github-com-prometheus-client-golang") + (version "1.19.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/prometheus/client_golang") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0mx5q221pbkx081ycf1lp8sxz513220ya8qczkkvab943cwlcarv")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/prometheus/client_golang" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-examples-and-tutorials + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (for-each delete-file-recursively + (list "api/prometheus/v1/example_test.go" + "examples" + "tutorial"))))) + ;; 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-beorn7-perks + go-github-com-cespare-xxhash-v2 + go-github-com-davecgh-go-spew + go-github-com-json-iterator-go + go-github-com-prometheus-client-model + go-github-com-prometheus-common + go-github-com-prometheus-procfs + go-golang-org-x-sys + go-google-golang-org-protobuf)) + (home-page "https://github.com/prometheus/client_golang") + (synopsis "HTTP server and client tools for Prometheus") + (description + "This package @code{promhttp} provides HTTP client and server tools for +Prometheus metrics.") + (license license:asl2.0))) + (define-public go-github-com-prometheus-client-model (package (name "go-github-com-prometheus-client-model") |