about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/msldapdump/default.nix
blob: cf232c3df6970c050e6048272d9e23c8d5138876 (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
{ lib
, python3
, fetchFromGitHub
}:

python3.pkgs.buildPythonApplication rec {
  pname = "msldapdump";
  version = "unstable-2023-06-12";
  format = "other";

  src = fetchFromGitHub {
    owner = "dievus";
    repo = "msLDAPDump";
    rev = "bdffe66be20ff844f55f69fd6d842d7f75f66f2d";
    hash = "sha256-qH4AaebrTKYxxjXawllxgiG9fVm03zmTRv/HAyNpewg=";
  };

  propagatedBuildInputs = with python3.pkgs; [
    colorama
    ldap3
  ];

  dontBuild = true;

  installPhase = ''
    runHook preInstall

    install -vD msLDAPDump.py $out/bin/msLDAPDump.py

    makeWrapper ${python3.interpreter} $out/bin/msldapdump \
      --set PYTHONPATH "$PYTHONPATH:$out/bin/msLDAPDump.py" \
      --add-flags "-O $out/bin/msLDAPDump.py"

    runHook postInstall
  '';

  # Project has no tests
  doCheck = false;

  meta = with lib; {
    description = "LDAP enumeration tool";
    homepage = "https://github.com/dievus/msLDAPDump";
    license = licenses.agpl3Only;
    maintainers = with maintainers; [ fab ];
  };
}