1{ 2 lib, 3 attrs, 4 beautifulsoup4, 5 buildPythonPackage, 6 certvalidator, 7 colorama, 8 cryptoparser, 9 dnspython, 10 fetchPypi, 11 pathlib2, 12 pyfakefs, 13 python-dateutil, 14 pythonOlder, 15 requests, 16 setuptools, 17 setuptools-scm, 18 urllib3, 19}: 20 21buildPythonPackage rec { 22 pname = "cryptolyzer"; 23 version = "1.0.0"; 24 pyproject = true; 25 26 disabled = pythonOlder "3.9"; 27 28 src = fetchPypi { 29 inherit pname version; 30 hash = "sha256-rRiRaXONLMNirKsK+QZWMSvaGeSLrHN9BpM8dhxoaxY="; 31 }; 32 33 patches = [ 34 # https://gitlab.com/coroner/cryptolyzer/-/merge_requests/4 35 ./fix-dirs-exclude.patch 36 ]; 37 38 pythonRemoveDeps = [ "bs4" ]; 39 40 build-system = [ 41 setuptools 42 setuptools-scm 43 ]; 44 45 dependencies = [ 46 attrs 47 beautifulsoup4 48 certvalidator 49 colorama 50 cryptoparser 51 dnspython 52 pathlib2 53 pyfakefs 54 python-dateutil 55 requests 56 urllib3 57 ]; 58 59 # Tests require networking 60 doCheck = false; 61 62 postInstall = '' 63 find $out -name "__pycache__" -type d | xargs rm -rv 64 65 # Prevent creating more binary byte code later (e.g. during 66 # pythonImportsCheck) 67 export PYTHONDONTWRITEBYTECODE=1 68 ''; 69 70 pythonImportsCheck = [ "cryptolyzer" ]; 71 72 meta = { 73 description = "Cryptographic protocol analyzer"; 74 homepage = "https://gitlab.com/coroner/cryptolyzer"; 75 changelog = "https://gitlab.com/coroner/cryptolyzer/-/blob/v${version}/CHANGELOG.md"; 76 license = lib.licenses.mpl20; 77 mainProgram = "cryptolyze"; 78 maintainers = with lib.maintainers; [ kranzes ]; 79 teams = with lib.teams; [ ngi ]; 80 }; 81}