1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchPypi, 6 poetry-core, 7 cryptography, 8 fido2, 9 requests, 10 tlv8, 11 pyserial, 12 protobuf, 13 semver, 14 crcmod, 15 hidapi, 16}: 17 18buildPythonPackage rec { 19 pname = "nitrokey"; 20 version = "0.3.1"; 21 pyproject = true; 22 23 src = fetchPypi { 24 inherit pname version; 25 hash = "sha256-Lf20du+DDwMrHrC+wCXxFNG8ThBnbonx4wq7DatH4X4="; 26 }; 27 28 disabled = pythonOlder "3.9"; 29 30 pythonRelaxDeps = [ "protobuf" ]; 31 32 build-system = [ poetry-core ]; 33 34 dependencies = [ 35 fido2 36 requests 37 semver 38 tlv8 39 crcmod 40 cryptography 41 hidapi 42 protobuf 43 pyserial 44 ]; 45 46 # no tests 47 doCheck = false; 48 49 pythonImportsCheck = [ "nitrokey" ]; 50 51 meta = with lib; { 52 description = "Python SDK for Nitrokey devices"; 53 homepage = "https://github.com/Nitrokey/nitrokey-sdk-py"; 54 changelog = "https://github.com/Nitrokey/nitrokey-sdk-py/releases/tag/v${version}"; 55 license = with licenses; [ 56 asl20 57 mit 58 ]; 59 maintainers = with maintainers; [ panicgh ]; 60 }; 61}