Unverified Commit 4e0eec54 authored by Franz Pletz's avatar Franz Pletz Committed by GitHub
Browse files

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

parents fe1af4b9 2aa2b0c4
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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; };