summary refs log tree commit diff
path: root/pkgs/servers/monitoring/mimir/default.nix
blob: db5c45f2fd37f4ec9a73082e1ae6eccc2ada5c59 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
  pname = "mimir";
  version = "2.0.0";

  src = fetchFromGitHub {
    rev = "${pname}-${version}";
    owner = "grafana";
    repo = pname;
    sha256 = "T1lljhC/TS3eoIc9AFo9Oy9/COM/XnfcwtkU618YCdM=";
  };

  vendorSha256 = null;

  subPackages = [ "cmd/mimir" ];

  ldflags = let t = "github.com/grafana/mimir/pkg/util/version";
  in [
    ''-extldflags "-static"''
    "-s"
    "-w"
    "-X ${t}.Version=${version}"
    "-X ${t}.Revision=unknown"
    "-X ${t}.Branch=unknown"
  ];

  meta = with lib; {
    description =
      "Grafana Mimir provides horizontally scalable, highly available, multi-tenant, long-term storage for Prometheus. ";
    homepage = "https://github.com/grafana/mimir";
    license = licenses.agpl3Only;
    maintainers = with maintainers; [ happysalada bryanhonof ];
    platforms = platforms.unix;
  };
}