2020-10-31 21:51:43 +00:00
|
|
|
{ stdenv, fetchFromGitHub, python3Packages }:
|
2017-08-07 16:24:07 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
bName = "check_esxi_hardware";
|
|
|
|
|
2020-10-31 21:51:43 +00:00
|
|
|
in python3Packages.buildPythonApplication rec {
|
|
|
|
pname = stdenv.lib.replaceStrings [ "_" ] [ "-" ] bName;
|
|
|
|
version = "20200710";
|
2017-08-07 16:24:07 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Napsty";
|
|
|
|
repo = bName;
|
|
|
|
rev = version;
|
2020-10-31 21:51:43 +00:00
|
|
|
sha256 = "EC6np/01S+5SA2H9z5psJ9Pq/YoEyGdHL9wHUKKsNas=";
|
2017-08-07 16:24:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2020-10-31 21:51:43 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2020-10-31 21:51:43 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [ pywbem requests setuptools ];
|
2017-08-07 16:24:07 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.claudiokuenzler.com/nagios-plugins/";
|
2017-08-07 16:24:07 +01:00
|
|
|
license = licenses.gpl2;
|
2017-12-05 22:20:11 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2017-08-07 16:24:07 +01:00
|
|
|
};
|
|
|
|
}
|