Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / monitoring / plugins / wmic-bin.nix
blob64cf171afea1cacafe00ee11e3af4fa9b8aefe50
1 { stdenv, lib, fetchFromGitHub, autoPatchelfHook, popt, libxcrypt-legacy }:
3 stdenv.mkDerivation rec {
4   pname = "wmic-bin";
5   version = "0.5.0";
7   src = fetchFromGitHub {
8     owner = "R-Vision";
9     repo = "wmi-client";
10     rev = version;
11     sha256 = "1w1mdbiwz37wzry1q38h8dyjaa6iggmsb9wcyhhlawwm1vj50w48";
12   };
14   buildInputs = [ popt libxcrypt-legacy ];
16   nativeBuildInputs = [ autoPatchelfHook ];
18   dontConfigure = true;
19   dontBuild = true;
20   doInstallCheck = true;
22   installPhase = ''
23     runHook preInstall
25     install -Dm755 bin/wmic_ubuntu_x64 $out/bin/wmic
26     install -Dm644 -t $out/share/doc/wmic LICENSE README.md
28     runHook postInstall
29   '';
31   installCheckPhase = ''
32     runHook preInstallCheck
34     $out/bin/wmic --help >/dev/null
36     runHook postInstallCheck
37   '';
39   meta = with lib; {
40     description = "WMI client for Linux (binary)";
41     mainProgram = "wmic";
42     homepage    = "https://www.openvas.org";
43     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
44     license     = licenses.mit;
45     maintainers = with maintainers; [ peterhoeg ];
46     platforms   = [ "x86_64-linux" ];
47   };