2024-10-18 12:27:27 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests, nix-update-script }:
|
|
|
|
buildGoModule rec {
|
2022-04-24 12:46:37 +00:00
|
|
|
pname = "mimir";
|
2024-10-18 12:27:27 +00:00
|
|
|
version = "2.14.0";
|
2022-04-24 12:46:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "${pname}-${version}";
|
|
|
|
owner = "grafana";
|
|
|
|
repo = pname;
|
2024-10-18 12:27:27 +00:00
|
|
|
hash = "sha256-XALr755tFYaMnI913NCjwFPieedS00RXv4KhjXfOPfw=";
|
2022-04-24 12:46:37 +00:00
|
|
|
};
|
|
|
|
|
2023-09-19 08:30:46 +00:00
|
|
|
vendorHash = null;
|
2022-04-24 12:46:37 +00:00
|
|
|
|
2022-05-28 17:10:44 +00:00
|
|
|
subPackages = [
|
|
|
|
"cmd/mimir"
|
|
|
|
"cmd/mimirtool"
|
2024-08-02 19:05:49 +00:00
|
|
|
] ++ (map (pathName: "tools/${pathName}") [
|
|
|
|
"compaction-planner"
|
|
|
|
"copyblocks"
|
|
|
|
"copyprefix"
|
|
|
|
"delete-objects"
|
|
|
|
"list-deduplicated-blocks"
|
|
|
|
"listblocks"
|
|
|
|
"markblocks"
|
|
|
|
"undelete-blocks"
|
|
|
|
]);
|
2022-04-24 12:46:37 +00:00
|
|
|
|
2022-12-20 10:50:31 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
extraArgs = [ "--version-regex" "mimir-([0-9.]+)" ];
|
|
|
|
};
|
|
|
|
tests = {
|
|
|
|
inherit (nixosTests) mimir;
|
|
|
|
};
|
2022-05-28 20:07:34 +00:00
|
|
|
};
|
|
|
|
|
2023-09-19 08:30:46 +00:00
|
|
|
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"
|
|
|
|
];
|
2022-04-24 12:46:37 +00:00
|
|
|
|
|
|
|
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;
|
2024-10-18 14:11:30 +00:00
|
|
|
maintainers = with maintainers; [ happysalada bryanhonof adamcstephens ];
|
2022-04-24 12:46:37 +00:00
|
|
|
};
|
|
|
|
}
|