From 728715dbc1f96fba8fa7c76af916aa554b3cf1a0 Mon Sep 17 00:00:00 2001 From: Shawn8901 Date: Wed, 1 May 2024 14:56:30 +0200 Subject: [PATCH] vmagent: build from victoriametrics package --- pkgs/by-name/vi/victoriametrics/package.nix | 2 +- pkgs/by-name/vm/vmagent/package.nix | 12 +++++++++ pkgs/servers/monitoring/vmagent/default.nix | 27 --------------------- pkgs/top-level/all-packages.nix | 2 -- 4 files changed, 13 insertions(+), 30 deletions(-) create mode 100644 pkgs/by-name/vm/vmagent/package.nix delete mode 100644 pkgs/servers/monitoring/vmagent/default.nix diff --git a/pkgs/by-name/vi/victoriametrics/package.nix b/pkgs/by-name/vi/victoriametrics/package.nix index 12f77b8a2bd2..132585ef073d 100644 --- a/pkgs/by-name/vi/victoriametrics/package.nix +++ b/pkgs/by-name/vi/victoriametrics/package.nix @@ -86,7 +86,7 @@ buildGoModule rec { homepage = "https://victoriametrics.com/"; description = "fast, cost-effective and scalable time series database, long-term remote storage for Prometheus"; license = licenses.asl20; - maintainers = with maintainers; [ yorickvp ivan ]; + maintainers = with maintainers; [ yorickvp ivan nullx76 leona ]; changelog = "https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v${version}"; mainProgram = "victoria-metrics"; }; diff --git a/pkgs/by-name/vm/vmagent/package.nix b/pkgs/by-name/vm/vmagent/package.nix new file mode 100644 index 000000000000..de62ddd2d386 --- /dev/null +++ b/pkgs/by-name/vm/vmagent/package.nix @@ -0,0 +1,12 @@ +{ lib, victoriametrics }: +lib.addMetaAttrs { mainProgram = "vmagent"; } ( + victoriametrics.override { + withServer = false; + withVictoriaLogs = false; + withVmAlert = false; + withVmAuth = false; + withBackupTools = false; + withVmctl = false; + withVmAgent = true; + } +) diff --git a/pkgs/servers/monitoring/vmagent/default.nix b/pkgs/servers/monitoring/vmagent/default.nix deleted file mode 100644 index 1dd054de46bc..000000000000 --- a/pkgs/servers/monitoring/vmagent/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib, fetchFromGitHub, buildGoModule }: -buildGoModule rec { - pname = "vmagent"; - version = "1.101.0"; - - src = fetchFromGitHub { - owner = "VictoriaMetrics"; - repo = "VictoriaMetrics"; - rev = "v${version}"; - sha256 = "sha256-Jjz/CbVCvc9NFbvzYTFthG8cov4pYpc6y1A1Kmd3Mjg="; - }; - - ldflags = [ "-s" "-w" "-X github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo.Version=${version}" ]; - - vendorHash = null; - - subPackages = [ "app/vmagent" ]; - - meta = with lib; { - homepage = "https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/app/vmagent"; - description = "VictoriaMetrics metrics scraper"; - mainProgram = "vmagent"; - license = licenses.asl20; - platforms = platforms.linux; - maintainers = with maintainers; [ nullx76 leona ]; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 19ab9ab4d564..e9aab55aede7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26531,8 +26531,6 @@ with pkgs; virtualenv-clone = with python3Packages; toPythonApplication virtualenv-clone; - vmagent = callPackage ../servers/monitoring/vmagent { }; - vsftpd = callPackage ../servers/ftp/vsftpd { }; wallabag = callPackage ../servers/web-apps/wallabag { };