1{
2 lib,
3 asn1crypto,
4 attrs,
5 buildPythonPackage,
6 cryptodatahub,
7 fetchPypi,
8 pytestCheckHook,
9 python-dateutil,
10 pythonOlder,
11 setuptools,
12 unittestCheckHook,
13 urllib3,
14}:
15
16buildPythonPackage rec {
17 pname = "cryptoparser";
18 version = "0.12.4";
19 pyproject = true;
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-y5rpc0tn5JJQr4xdRUJbsq8XT/YqqJqZr3CXjqN7k7I=";
26 };
27
28 postPatch = ''
29 substituteInPlace requirements.txt \
30 --replace-fail "attrs>=20.3.0,<22.0.1" "attrs>=20.3.0"
31 '';
32
33 build-system = [ setuptools ];
34
35 dependencies = [
36 asn1crypto
37 attrs
38 cryptodatahub
39 python-dateutil
40 urllib3
41 ];
42
43 pythonImportsCheck = [ "cryptoparser" ];
44
45 meta = with lib; {
46 description = "Security protocol parser and generator";
47 homepage = "https://gitlab.com/coroner/cryptoparser";
48 changelog = "https://gitlab.com/coroner/cryptoparser/-/blob/v${version}/CHANGELOG.md";
49 license = licenses.mpl20;
50 maintainers = with maintainers; [ kranzes ];
51 };
52}