mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, nixosTests, nix-update-script }:
|
|
buildGoModule rec {
|
|
pname = "mimir";
|
|
version = "2.6.0";
|
|
|
|
src = fetchFromGitHub {
|
|
rev = "${pname}-${version}";
|
|
owner = "grafana";
|
|
repo = pname;
|
|
sha256 = "sha256-MOuLXtjmk9wjQMF2ez3NQ7YTKJtX/RItKbgfaANXzhU=";
|
|
};
|
|
|
|
vendorSha256 = null;
|
|
|
|
subPackages = [
|
|
"cmd/mimir"
|
|
"cmd/mimirtool"
|
|
];
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script {
|
|
extraArgs = [ "--version-regex" "mimir-([0-9.]+)" ];
|
|
};
|
|
tests = {
|
|
inherit (nixosTests) 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;
|
|
};
|
|
}
|