guix_mirror_bot pushed a commit to branch go-team in repository guix. commit 07e4a0b7820ecdce3c54d87fc0ee989089e6d7f0 Author: Sharlatan Hellseher <sharlata...@gmail.com> AuthorDate: Tue Jun 10 22:27:52 2025 +0100
gnu: Add go-github-com-slok-go-http-metrics. * gnu/packages/prometheus.scm (go-github-com-slok-go-http-metrics): New variable. Change-Id: I0b747593d7161729a4b85655e3e9a8e1a1bc7257 --- gnu/packages/prometheus.scm | 50 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/gnu/packages/prometheus.scm b/gnu/packages/prometheus.scm index 57606b74ab..4e3f028ac4 100644 --- a/gnu/packages/prometheus.scm +++ b/gnu/packages/prometheus.scm @@ -546,6 +546,56 @@ metrics to Prometheus metrics via configured mapping rules. This package provides a Golang module and @code{statsd_exporter} executable command.") (license license:asl2.0))) +(define-public go-github-com-slok-go-http-metrics + (package + (name "go-github-com-slok-go-http-metrics") + (version "0.13.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/slok/go-http-metrics") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1lrnf0vhqlnhad6n8yyc2iafqlw6jr55cmyg9gqns2yi2gdfqv8m")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/slok/go-http-metrics" + ;; XXX: Full tests require Iris package. + #:test-subdirs #~(list "metrics/...") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-examples + (lambda* (#:key tests? import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (delete-file-recursively "examples"))))))) + (propagated-inputs + (list go-contrib-go-opencensus-io-exporter-prometheus + go-github-com-emicklei-go-restful-v3 + go-github-com-fasthttp-router + go-github-com-gin-gonic-gin + go-github-com-go-chi-chi-v5 + go-github-com-gorilla-mux + go-github-com-julienschmidt-httprouter + go-github-com-justinas-alice + ;; go-github-com-kataras-iris-v12 + go-github-com-labstack-echo-v4 + go-github-com-prometheus-client-golang + go-github-com-stretchr-testify + go-github-com-urfave-negroni + go-github-com-valyala-fasthttp + go-go-opencensus-io + go-goji-io)) + (home-page "https://github.com/slok/go-http-metrics") + (synopsis "Modular http middleware to measure HTTP requests") + (description + "Package gohttpmetrics knows how to measure http metrics in different +metric formats, it comes with a middleware that can be used for different +frameworks and also the the main Go net/http handler:.") + (license license:asl2.0))) + ;;; ;;; Executables: ;;;