prometheus-nats-exporter: add updateScript and testVersion (#336946)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
{ lib, buildGoModule, fetchFromGitHub, gitUpdater, testers, prometheus-nats-exporter }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "prometheus-nats-exporter";
|
||||
@@ -18,6 +18,21 @@ buildGoModule rec {
|
||||
export GODEBUG=x509sha1=1;
|
||||
'';
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.version=${version}"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = gitUpdater { rev-prefix = "v"; };
|
||||
tests = {
|
||||
prometheus-nats-exporter-version = testers.testVersion {
|
||||
package = prometheus-nats-exporter;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Exporter for NATS metrics";
|
||||
homepage = "https://github.com/nats-io/prometheus-nats-exporter";
|
||||
|
||||
Reference in New Issue
Block a user