2017-08-07 16:24:07 +01:00
|
|
|
{ stdenv, fetchFromGitHub, python2Packages }:
|
|
|
|
|
|
|
|
let
|
|
|
|
bName = "check_esxi_hardware";
|
2019-09-09 00:38:31 +01:00
|
|
|
pName = stdenv.lib.replaceStrings [ "_" ] [ "-" ] bName;
|
2017-08-07 16:24:07 +01:00
|
|
|
|
|
|
|
in python2Packages.buildPythonApplication rec {
|
|
|
|
name = "${pName}-${version}";
|
2018-12-27 06:22:27 +00:00
|
|
|
version = "20181001";
|
2017-08-07 16:24:07 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Napsty";
|
|
|
|
repo = bName;
|
|
|
|
rev = version;
|
2018-12-27 06:22:27 +00:00
|
|
|
sha256 = "0azfacxcnnxxfqzrhh29k8cnjyr88gz35bi6h8fq931fl3plv10l";
|
2017-08-07 16:24:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 -t $out/bin ${bName}.py
|
|
|
|
install -Dm644 -t $out/share/doc/${pName} README.md
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python2Packages; [ pywbem ];
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|