nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, lib, fetchFromGitHub, autoPatchelfHook, popt, libxcrypt-legacy }:
2
3stdenv.mkDerivation rec {
4 pname = "wmic-bin";
5 version = "0.5.0";
6
7 src = fetchFromGitHub {
8 owner = "R-Vision";
9 repo = "wmi-client";
10 rev = version;
11 sha256 = "1w1mdbiwz37wzry1q38h8dyjaa6iggmsb9wcyhhlawwm1vj50w48";
12 };
13
14 buildInputs = [ popt libxcrypt-legacy ];
15
16 nativeBuildInputs = [ autoPatchelfHook ];
17
18 dontConfigure = true;
19 dontBuild = true;
20 doInstallCheck = true;
21
22 installPhase = ''
23 runHook preInstall
24
25 install -Dm755 bin/wmic_ubuntu_x64 $out/bin/wmic
26 install -Dm644 -t $out/share/doc/wmic LICENSE README.md
27
28 runHook postInstall
29 '';
30
31 installCheckPhase = ''
32 runHook preInstallCheck
33
34 $out/bin/wmic --help >/dev/null
35
36 runHook postInstallCheck
37 '';
38
39 meta = with lib; {
40 description = "WMI client for Linux (binary)";
41 homepage = "https://www.openvas.org";
42 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
43 license = licenses.mit;
44 maintainers = with maintainers; [ peterhoeg ];
45 platforms = [ "x86_64-linux" ];
46 };
47}