prometheus-nginx-exporter: fix build info

This commit is contained in:
Luca Comellini 2024-10-25 17:12:34 -07:00
parent 67bef9e807
commit 2aa2b0c423
No known key found for this signature in database
GPG Key ID: 4850B36E838507C6

View File

@ -13,7 +13,14 @@ buildGoModule rec {
vendorHash = "sha256-qmyqAbwQYgUFFQwCLakQGta2XMGCbCOvCB93S8/TWIs=";
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
ldflags = let t = "github.com/prometheus/common/version"; in [
"-s"
"-w"
"-X ${t}.Version=${version}"
"-X ${t}.Branch=unknown"
"-X ${t}.BuildUser=nix@nixpkgs"
"-X ${t}.BuildDate=unknown"
];
passthru.tests = { inherit (nixosTests.prometheus-exporters) nginx; };