1{ lib
2, stdenv
3, fetchFromGitHub
4, makeWrapper
5, samba
6, perl
7, openldap
8}:
9
10stdenv.mkDerivation rec {
11 pname = "enum4linux";
12 version = "0.9.1";
13
14 src = fetchFromGitHub {
15 owner = "CiscoCXSecurity";
16 repo = pname;
17 rev = "v${version}";
18 sha256 = "sha256-/R0P4Ft9Y0LZwKwhDGAe36UKviih6CNbJbj1lcNKEkM=";
19 };
20
21 dontBuild = true;
22
23 nativeBuildInputs = [
24 makeWrapper
25 ];
26
27 buildInputs = [
28 openldap
29 perl
30 samba
31 ];
32
33 installPhase = ''
34 mkdir -p $out/bin
35 cp enum4linux.pl $out/bin/enum4linux
36
37 wrapProgram $out/bin/enum4linux \
38 --prefix PATH : ${lib.makeBinPath [ samba openldap ]}
39 '';
40
41 meta = with lib; {
42 description = "A tool for enumerating information from Windows and Samba systems";
43 homepage = "https://labs.portcullis.co.uk/tools/enum4linux/";
44 license = licenses.gpl2Plus;
45 maintainers = with maintainers; [ fishi0x01 ];
46 platforms = platforms.unix;
47 };
48}
49