aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/servers/monitoring/plugins/esxi.nix
blob: 897d6395f95a726ee1c08aabb2054d6859a2e60b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ stdenv, fetchFromGitHub, python2Packages }:

let
  bName = "check_esxi_hardware";
  pName = stdenv.lib.replaceStrings [ "_" ] [ "-" ] bName;

in python2Packages.buildPythonApplication rec {
  name = "${pName}-${version}";
  version = "20181001";

  src = fetchFromGitHub {
    owner  = "Napsty";
    repo   = bName;
    rev    = version;
    sha256 = "0azfacxcnnxxfqzrhh29k8cnjyr88gz35bi6h8fq931fl3plv10l";
  };

  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; {
    homepage = "https://www.claudiokuenzler.com/nagios-plugins/";
    license = licenses.gpl2;
    maintainers = with maintainers; [ peterhoeg ];
  };
}