mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
31fb859666
Added some tools which are necessary for regular cluster operation, maintenance, and disaster recovery. These tools can be found [here](https://github.com/grafana/mimir/tree/main/tools)
56 lines
1.3 KiB
Nix
56 lines
1.3 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, nixosTests, nix-update-script }:
|
|
buildGoModule rec {
|
|
pname = "mimir";
|
|
version = "2.13.0";
|
|
|
|
src = fetchFromGitHub {
|
|
rev = "${pname}-${version}";
|
|
owner = "grafana";
|
|
repo = pname;
|
|
hash = "sha256-XBCwc3jpLx8uj+UitFsoIAWVgC/2G8rgjOqrrLLyYdM=";
|
|
};
|
|
|
|
vendorHash = null;
|
|
|
|
subPackages = [
|
|
"cmd/mimir"
|
|
"cmd/mimirtool"
|
|
] ++ (map (pathName: "tools/${pathName}") [
|
|
"compaction-planner"
|
|
"copyblocks"
|
|
"copyprefix"
|
|
"delete-objects"
|
|
"list-deduplicated-blocks"
|
|
"listblocks"
|
|
"markblocks"
|
|
"undelete-blocks"
|
|
]);
|
|
|
|
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 ];
|
|
};
|
|
}
|