2021-01-17 00:15:33 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "VictoriaMetrics";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "1.81.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "sha256-O13dNhj+0SVz/6RNmFIJKSXqd38zdFc1CJ09q3jiKfg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
vendorSha256 = null;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
postPatch = ''
|
|
|
|
# main module (github.com/VictoriaMetrics/VictoriaMetrics) does not contain package
|
|
|
|
# github.com/VictoriaMetrics/VictoriaMetrics/app/vmui/packages/vmui/web
|
|
|
|
#
|
2022-06-16 17:23:12 +00:00
|
|
|
# This appears to be some kind of test server for development purposes only.
|
2022-05-18 14:49:53 +00:00
|
|
|
rm -f app/vmui/packages/vmui/web/{go.mod,main.go}
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
# Increase timeouts in tests to prevent failure on heavily loaded builders
|
|
|
|
substituteInPlace lib/storage/storage_test.go \
|
|
|
|
--replace "time.After(10 " "time.After(120 " \
|
|
|
|
--replace "time.After(30 " "time.After(120 "
|
2022-05-18 14:49:53 +00:00
|
|
|
'';
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo.Version=${version}" ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) victoriametrics; };
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://victoriametrics.com/";
|
|
|
|
description = "fast, cost-effective and scalable time series database, long-term remote storage for Prometheus";
|
|
|
|
license = licenses.asl20;
|
2022-05-18 14:49:53 +00:00
|
|
|
maintainers = with maintainers; [ yorickvp ivan ];
|
2021-05-20 23:08:51 +00:00
|
|
|
changelog = "https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v${version}";
|
|
|
|
platforms = [ "x86_64-linux" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|