6 withServer ? true, # the actual metrics server
7 withVmAgent ? true, # Agent to collect metrics
8 withVmAlert ? true, # Alert Manager
9 withVmAuth ? true, # HTTP proxy for authentication
10 withBackupTools ? true, # vmbackup, vmrestore
11 withVmctl ? true, # vmctl is used to migrate time series
12 withVictoriaLogs ? true, # logs server
16 pname = "VictoriaMetrics";
19 src = fetchFromGitHub {
20 owner = "VictoriaMetrics";
21 repo = "VictoriaMetrics";
23 hash = "sha256-cMc2CVjVTQLsY/GJht35DCapEtROPJO3j6FCCDXJPMk=";
29 lib.optionals withServer [
30 "app/victoria-metrics"
36 ++ lib.optionals withVmAgent [ "app/vmagent" ]
37 ++ lib.optionals withVmAlert [
41 ++ lib.optionals withVmAuth [ "app/vmauth" ]
42 ++ lib.optionals withVmctl [ "app/vmctl" ]
43 ++ lib.optionals withBackupTools [
47 ++ lib.optionals withVictoriaLogs [
55 # main module (github.com/VictoriaMetrics/VictoriaMetrics) does not contain package
56 # github.com/VictoriaMetrics/VictoriaMetrics/app/vmui/packages/vmui/web
58 # This appears to be some kind of test server for development purposes only.
59 rm -f app/vmui/packages/vmui/web/{go.mod,main.go}
61 # Increase timeouts in tests to prevent failure on heavily loaded builders
62 substituteInPlace lib/storage/storage_test.go \
63 --replace "time.After(10 " "time.After(120 " \
64 --replace "time.NewTimer(30 " "time.NewTimer(120 " \
65 --replace "time.NewTimer(time.Second * 10)" "time.NewTimer(time.Second * 120)" \
71 "-X github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo.Version=${version}"
75 # `lib/querytracer/tracer_test.go` expects `buildinfo.Version` to be unset
76 export ldflags=''${ldflags//=${version}/=}
79 __darwinAllowLocalNetworking = true;
82 inherit (nixosTests) victoriametrics;
86 homepage = "https://victoriametrics.com/";
87 description = "fast, cost-effective and scalable time series database, long-term remote storage for Prometheus";
88 license = licenses.asl20;
89 maintainers = with maintainers; [
96 changelog = "https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v${version}";
97 mainProgram = "victoria-metrics";