prometheus-nginx-exporter: fix build info (#351308)

This commit is contained in:
Franz Pletz 2024-10-26 16:05:56 +02:00 committed by GitHub
commit 4e0eec54db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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; };