about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/enum4linux/default.nix
blob: b6da742dc6fada96608349db7b1cb322fe348708 (plain) (blame)
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
38
39
40
41
42
43
44
45
46
47
48
49
{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, samba
, perl
, openldap
}:

stdenv.mkDerivation rec {
  pname = "enum4linux";
  version = "0.9.1";

  src = fetchFromGitHub {
    owner = "CiscoCXSecurity";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-/R0P4Ft9Y0LZwKwhDGAe36UKviih6CNbJbj1lcNKEkM=";
  };

  dontBuild = true;

  nativeBuildInputs = [
    makeWrapper
  ];

  buildInputs = [
    openldap
    perl
    samba
  ];

  installPhase = ''
    mkdir -p $out/bin
    cp enum4linux.pl $out/bin/enum4linux

    wrapProgram $out/bin/enum4linux \
      --prefix PATH : ${lib.makeBinPath [ samba openldap ]}
  '';

  meta = with lib; {
    description = "A tool for enumerating information from Windows and Samba systems";
    homepage = "https://labs.portcullis.co.uk/tools/enum4linux/";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ fishi0x01 ];
    platforms = platforms.unix;
  };
}