grafana-loki: add buildinfo

Otherwise, no version output is shown with `--version` or during log
messages.
This commit is contained in:
Maximilian Bosch 2021-03-03 00:12:37 +01:00
parent 28c0ac19db
commit 89aba1d889
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E

View file

@ -26,6 +26,10 @@ buildGoModule rec {
passthru.tests = { inherit (nixosTests) loki; };
buildFlagsArray = let t = "github.com/grafana/loki/pkg/build"; in ''
-ldflags=-s -w -X ${t}.Version=${version} -X ${t}.BuildUser=nix@nixpkgs -X ${t}.BuildDate=unknown -X ${t}.Branch=unknown -X ${t}.Revision=unknown
'';
doCheck = true;
meta = with lib; {