nixpkgs/pkgs/servers/monitoring/plugins/esxi.nix

37 lines
841 B
Nix
Raw Normal View History

{ lib, fetchFromGitHub, python3Packages }:
2017-08-07 16:24:07 +01:00
let
bName = "check_esxi_hardware";
in python3Packages.buildPythonApplication rec {
2021-01-15 07:07:56 +00:00
pname = lib.replaceStrings [ "_" ] [ "-" ] bName;
version = "20200710";
2017-08-07 16:24:07 +01:00
src = fetchFromGitHub {
owner = "Napsty";
repo = bName;
rev = version;
sha256 = "EC6np/01S+5SA2H9z5psJ9Pq/YoEyGdHL9wHUKKsNas=";
2017-08-07 16:24:07 +01:00
};
dontBuild = true;
doCheck = false;
installPhase = ''
runHook preInstall
install -Dm755 ${bName}.py $out/bin/${bName}
install -Dm644 -t $out/share/doc/${pname} README.md
2017-08-07 16:24:07 +01:00
runHook postInstall
'';
propagatedBuildInputs = with python3Packages; [ pywbem requests setuptools ];
2017-08-07 16:24:07 +01:00
meta = with lib; {
homepage = "https://www.claudiokuenzler.com/nagios-plugins/";
2017-08-07 16:24:07 +01:00
license = licenses.gpl2;
maintainers = with maintainers; [ peterhoeg ];
2017-08-07 16:24:07 +01:00
};
}