prometheus-systemd-exporter: Added ldflags to include version into
build_info metric. Fixes: #256135
This commit is contained in:
parent
ed5ab56d4c
commit
9958dbbd26
@ -13,6 +13,16 @@ buildGoModule rec {
|
||||
sha256 = "sha256-q6rnD8JCtB1zTkUfZt6f2Uyo91uFi3HYI7WFlZdzpBM=";
|
||||
};
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X github.com/prometheus/common/version.Version=${version}"
|
||||
"-X github.com/prometheus/common/version.Revision=unknown"
|
||||
"-X github.com/prometheus/common/version.Branch=unknown"
|
||||
"-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
|
||||
"-X github.com/prometheus/common/version.BuildDate=unknown"
|
||||
];
|
||||
|
||||
passthru.tests = { inherit (nixosTests.prometheus-exporters) systemd; };
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user