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

37 lines
849 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, python3Packages }:
2017-08-07 15:24:07 +00: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 15:24:07 +00:00
src = fetchFromGitHub {
owner = "Napsty";
repo = bName;
rev = version;
sha256 = "EC6np/01S+5SA2H9z5psJ9Pq/YoEyGdHL9wHUKKsNas=";
2017-08-07 15:24:07 +00: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 15:24:07 +00:00
runHook postInstall
'';
propagatedBuildInputs = with python3Packages; [ pywbem requests setuptools ];
2017-08-07 15:24:07 +00:00
meta = with lib; {
homepage = "https://www.claudiokuenzler.com/nagios-plugins/";
2017-08-07 15:24:07 +00:00
license = licenses.gpl2;
maintainers = with maintainers; [ peterhoeg ];
2017-08-07 15:24:07 +00:00
};
}