1{
2 lib,
3 buildPythonPackage,
4 charset-normalizer,
5 dsinternals,
6 fetchPypi,
7 flask,
8 ldap3,
9 ldapdomaindump,
10 pyasn1,
11 pyasn1-modules,
12 pycryptodomex,
13 pyopenssl,
14 pythonOlder,
15 setuptools,
16 pytestCheckHook,
17 six,
18}:
19
20buildPythonPackage rec {
21 pname = "impacket";
22 version = "0.12.0";
23 pyproject = true;
24
25 disabled = pythonOlder "3.8";
26
27 src = fetchPypi {
28 inherit pname version;
29 hash = "sha256-iVh9G4NqUiDXSEjJNHV5YrOCiG3KixtKDETWk/JgBkM=";
30 };
31
32 pythonRelaxDeps = [ "pyopenssl" ];
33
34 build-system = [ setuptools ];
35
36 dependencies = [
37 charset-normalizer
38 dsinternals
39 flask
40 ldap3
41 ldapdomaindump
42 pyasn1
43 pyasn1-modules
44 pycryptodomex
45 pyopenssl
46 setuptools
47 six
48 ];
49
50 nativeCheckInputs = [ pytestCheckHook ];
51
52 pythonImportsCheck = [ "impacket" ];
53
54 disabledTestPaths = [
55 # Skip all RPC related tests
56 "tests/dcerpc/"
57 "tests/SMB_RPC/"
58 ];
59
60 meta = with lib; {
61 description = "Network protocols Constructors and Dissectors";
62 homepage = "https://github.com/SecureAuthCorp/impacket";
63 changelog =
64 "https://github.com/fortra/impacket/releases/tag/impacket_"
65 + replaceStrings [ "." ] [ "_" ] version;
66 # Modified Apache Software License, Version 1.1
67 license = licenses.free;
68 maintainers = with maintainers; [ fab ];
69 };
70}