depot/third_party/nixpkgs/pkgs/servers/monitoring/mimir/default.nix
Default email ae2dc6aea6 Project import generated by Copybara.
GitOrigin-RevId: 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0
2024-10-11 07:15:48 +02:00

58 lines
1.4 KiB
Nix

{ lib, buildGo122Module, fetchFromGitHub, nixosTests, nix-update-script }:
# Does not build with Go 1.23
# FIXME: check again for next release
buildGo122Module 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 ];
};
}