1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 cryptography, 11 pycryptodomex, 12 13 # tests 14 pytestCheckHook, 15}: 16 17buildPythonPackage rec { 18 pname = "pysnmpcrypto"; 19 version = "0.0.4"; 20 pyproject = true; 21 22 src = fetchPypi { 23 inherit pname version; 24 hash = "sha256-tjX7Ox7GY3uaADP1BQYhThbrhFdLHSWrAnu95MqlUSk="; 25 }; 26 27 postPatch = '' 28 # ValueError: invalid literal for int() with base 10: 'post0' in File "<string>", line 104, in <listcomp> 29 substituteInPlace setup.py --replace \ 30 "observed_version = [int(x) for x in setuptools.__version__.split('.')]" \ 31 "observed_version = [36, 2, 0]" 32 ''; 33 34 nativeBuildInputs = [ setuptools ]; 35 36 propagatedBuildInputs = [ 37 cryptography 38 pycryptodomex 39 ]; 40 41 nativeCheckInputs = [ pytestCheckHook ]; 42 43 pythonImportsCheck = [ "pysnmpcrypto" ]; 44 45 meta = with lib; { 46 description = "Strong crypto support for Python SNMP library"; 47 homepage = "https://github.com/etingof/pysnmpcrypto"; 48 changelog = "https://github.com/etingof/pysnmpcrypto/blob/${version}/CHANGES.txt"; 49 license = licenses.bsd2; 50 maintainers = with maintainers; [ ]; 51 }; 52}