diff --git a/pkgs/servers/monitoring/prometheus/statsd-exporter.nix b/pkgs/servers/monitoring/prometheus/statsd-exporter.nix index ca650c53475d..201ec3a32e36 100644 --- a/pkgs/servers/monitoring/prometheus/statsd-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/statsd-exporter.nix @@ -14,6 +14,18 @@ buildGoModule rec { hash = "sha256-C7+4v40T667KJHEQ3ebLDg2wJNrxD/nossfT6rMlER8="; }; + ldflags = + let + t = "github.com/prometheus/common/version"; + in + [ "-s" "-w" + "-X ${t}.Version=${version}" + "-X ${t}.Revision=unknown" + "-X ${t}.Branch=unknown" + "-X ${t}.BuildUser=nix@nixpkgs" + "-X ${t}.BuildDate=unknown" + ]; + vendorHash = "sha256-scBpRZeECgAtpu9lnkIk1I2c8UmAkEL8LYNPUeUNYto="; meta = with lib; {