1{ 2 lib, 3 asn1crypto, 4 attrs, 5 buildPythonPackage, 6 cryptodatahub, 7 fetchPypi, 8 python-dateutil, 9 pythonOlder, 10 setuptools, 11 setuptools-scm, 12 urllib3, 13}: 14 15buildPythonPackage rec { 16 pname = "cryptoparser"; 17 version = "1.0.0"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.9"; 21 22 src = fetchPypi { 23 inherit pname version; 24 hash = "sha256-bEvhMVcm9sXlfhxUD2K4N10nusgxpGYFJQLtJE1/qok="; 25 }; 26 27 patches = [ 28 # https://gitlab.com/coroner/cryptoparser/-/merge_requests/2 29 ./fix-dirs-exclude.patch 30 ]; 31 32 build-system = [ 33 setuptools 34 setuptools-scm 35 ]; 36 37 dependencies = [ 38 asn1crypto 39 attrs 40 cryptodatahub 41 python-dateutil 42 urllib3 43 ]; 44 45 postInstall = '' 46 find $out -name "__pycache__" -type d | xargs rm -rv 47 48 # Prevent creating more binary byte code later (e.g. during 49 # pythonImportsCheck) 50 export PYTHONDONTWRITEBYTECODE=1 51 ''; 52 53 pythonImportsCheck = [ "cryptoparser" ]; 54 55 meta = with lib; { 56 description = "Security protocol parser and generator"; 57 homepage = "https://gitlab.com/coroner/cryptoparser"; 58 changelog = "https://gitlab.com/coroner/cryptoparser/-/blob/v${version}/CHANGELOG.md"; 59 license = licenses.mpl20; 60 maintainers = with maintainers; [ kranzes ]; 61 }; 62}