diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/monitoring/plugins/esxi.nix')
-rw-r--r-- | nixpkgs/pkgs/servers/monitoring/plugins/esxi.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/monitoring/plugins/esxi.nix b/nixpkgs/pkgs/servers/monitoring/plugins/esxi.nix new file mode 100644 index 000000000000..ccd77548c0c0 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/plugins/esxi.nix @@ -0,0 +1,37 @@ +{ lib, fetchFromGitHub, python3Packages }: + +let + bName = "check_esxi_hardware"; + +in python3Packages.buildPythonApplication rec { + pname = lib.replaceStrings [ "_" ] [ "-" ] bName; + version = "20200710"; + format = "other"; + + src = fetchFromGitHub { + owner = "Napsty"; + repo = bName; + rev = version; + sha256 = "EC6np/01S+5SA2H9z5psJ9Pq/YoEyGdHL9wHUKKsNas="; + }; + + dontBuild = true; + doCheck = false; + + installPhase = '' + runHook preInstall + + install -Dm755 ${bName}.py $out/bin/${bName} + install -Dm644 -t $out/share/doc/${pname} README.md + + runHook postInstall + ''; + + propagatedBuildInputs = with python3Packages; [ pywbem requests setuptools ]; + + meta = with lib; { + homepage = "https://www.claudiokuenzler.com/nagios-plugins/"; + license = licenses.gpl2; + maintainers = with maintainers; [ peterhoeg ]; + }; +} |