2021-02-05 17:12:51 +00:00
|
|
|
{ lib, fetchFromGitHub, python3Packages }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
bName = "check_esxi_hardware";
|
|
|
|
|
2020-11-24 20:58:05 +00:00
|
|
|
in python3Packages.buildPythonApplication rec {
|
2021-01-15 22:18:51 +00:00
|
|
|
pname = lib.replaceStrings [ "_" ] [ "-" ] bName;
|
2020-11-24 20:58:05 +00:00
|
|
|
version = "20200710";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Napsty";
|
|
|
|
repo = bName;
|
|
|
|
rev = version;
|
2020-11-24 20:58:05 +00:00
|
|
|
sha256 = "EC6np/01S+5SA2H9z5psJ9Pq/YoEyGdHL9wHUKKsNas=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2020-11-24 20:58:05 +00:00
|
|
|
install -Dm755 ${bName}.py $out/bin/${bName}
|
|
|
|
install -Dm644 -t $out/share/doc/${pname} README.md
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2020-11-24 20:58:05 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [ pywbem requests setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.claudiokuenzler.com/nagios-plugins/";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
};
|
|
|
|
}
|