diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index c5bee744dd..1d484b3f51 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -88,6 +88,7 @@ (define-module (gnu packages backup) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages prometheus) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) #:use-module (gnu packages python-build) diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 8324a2f568..7d6b3a1c1d 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -72,6 +72,7 @@ (define-module (gnu packages golang-xyz) #:use-module (gnu packages golang-maths) #:use-module (gnu packages golang-web) #:use-module (gnu packages linux) + #:use-module (gnu packages prometheus) ; for go-github-com-nbrownus-go-metrics-prometheus #:use-module (gnu packages specifications)) ;;; Commentary: diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 56e6c6a627..ab00edc877 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -7375,55 +7375,6 @@ (define-public go-github-com-prometheus-procfs (home-page "https://github.com/prometheus/procfs") (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)) - (synopsis "HTTP server and client tools for Prometheus") - (description "This package @code{promhttp} provides HTTP client and -server tools for Prometheus metrics.") - (home-page "https://github.com/prometheus/client_golang") - (license license:asl2.0))) - (define-public go-github-com-zalando-go-keyring (package (name "go-github-com-zalando-go-keyring") diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm index ea3514afa9..ccf5728e4f 100644 --- a/gnu/packages/ipfs.scm +++ b/gnu/packages/ipfs.scm @@ -37,6 +37,7 @@ (define-module (gnu packages ipfs) #:use-module (gnu packages golang-crypto) #:use-module (gnu packages golang-web) #:use-module (gnu packages golang-xyz) + #:use-module (gnu packages prometheus) #:use-module (gnu packages python) #:use-module (gnu packages shells) #:use-module (gnu packages specifications)) diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm index aa4c9b8b53..e1cccb6d1f 100644 --- a/gnu/packages/irc.scm +++ b/gnu/packages/irc.scm @@ -90,6 +90,7 @@ (define-module (gnu packages irc) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages prometheus) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-xyz) 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 @@ (define-module (gnu packages prometheus) #: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 @@ (define-public go-github-com-mwitkow-go-conntrack (@@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") diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index eb6699c3a1..2be0cae94e 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -186,6 +186,7 @@ (define-module (gnu packages web) #:use-module (gnu packages perl) #:use-module (gnu packages perl-check) #:use-module (gnu packages perl-compression) + #:use-module (gnu packages prometheus) #:use-module (gnu packages python) #:use-module (gnu packages python-build) #:use-module (gnu packages python-check)