about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/certipy-ad/default.nix
blob: 794c35f4d75ce673d7b30f54e76b1118cecf872c (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{ lib
, asn1crypto
, buildPythonPackage
, cryptography
, dnspython
, dsinternals
, fetchFromGitHub
, impacket
, ldap3
, pyasn1
, pycryptodome
, pyopenssl
, pythonOlder
, requests
, requests-ntlm
, unicrypto
, setuptools
}:

buildPythonPackage rec {
  pname = "certipy-ad";
  version = "4.8.2";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "ly4k";
    repo = "Certipy";
    rev = "refs/tags/${version}";
    hash = "sha256-Era5iNLJkZIRvN/p3BiD/eDiDQme24G65VSG97tuEOQ=";
  };

  postPatch = ''
    # pin does not apply because our ldap3 contains a patch to fix pyasn1 compability
    substituteInPlace setup.py \
      --replace "pyasn1==0.4.8" "pyasn1"
  '';

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    asn1crypto
    cryptography
    dnspython
    dsinternals
    impacket
    ldap3
    pyasn1
    pycryptodome
    pyopenssl
    requests
    requests-ntlm
    setuptools
    unicrypto
  ];

  # Project has no tests
  doCheck = false;

  pythonImportsCheck = [
    "certipy"
  ];

  meta = with lib; {
    description = "Library and CLI tool to enumerate and abuse misconfigurations in Active Directory Certificate Services";
    mainProgram = "certipy";
    homepage = "https://github.com/ly4k/Certipy";
    changelog = "https://github.com/ly4k/Certipy/releases/tag/${version}";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}