From 89aba1d889f7e5007fa3157893fc913febb48809 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 3 Mar 2021 00:12:37 +0100 Subject: [PATCH] grafana-loki: add buildinfo Otherwise, no version output is shown with `--version` or during log messages. --- pkgs/servers/monitoring/loki/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/servers/monitoring/loki/default.nix b/pkgs/servers/monitoring/loki/default.nix index 99f83e1bfbd3..370006a591e8 100644 --- a/pkgs/servers/monitoring/loki/default.nix +++ b/pkgs/servers/monitoring/loki/default.nix @@ -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; {