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