Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 bleak, 5 buildPythonPackage, 6 ecpy, 7 fetchPypi, 8 future, 9 hidapi, 10 nfcpy, 11 pillow, 12 protobuf, 13 pycrypto, 14 pycryptodomex, 15 pyelftools, 16 python-gnupg, 17 python-u2flib-host, 18 pythonOlder, 19 setuptools, 20 setuptools-scm, 21 websocket-client, 22}: 23 24buildPythonPackage rec { 25 pname = "ledgerblue"; 26 version = "0.1.54"; 27 pyproject = true; 28 29 disabled = pythonOlder "3.7"; 30 31 src = fetchPypi { 32 inherit pname version; 33 hash = "sha256-Hn99ST6RnER6XI6+rqA3O9/aC+whYoTOzeoHGF/fFz4="; 34 }; 35 36 build-system = [ 37 setuptools 38 setuptools-scm 39 ]; 40 41 pythonRelaxDeps = [ "protobuf" ]; 42 43 dependencies = [ 44 ecpy 45 future 46 hidapi 47 nfcpy 48 pillow 49 protobuf 50 pycrypto 51 pycryptodomex 52 pyelftools 53 python-gnupg 54 python-u2flib-host 55 websocket-client 56 ] ++ lib.optionals stdenv.isLinux [ bleak ]; 57 58 # No tests 59 doCheck = false; 60 61 pythonImportsCheck = [ "ledgerblue" ]; 62 63 meta = with lib; { 64 description = "Python library to communicate with Ledger Blue/Nano S"; 65 homepage = "https://github.com/LedgerHQ/blue-loader-python"; 66 license = licenses.asl20; 67 maintainers = with maintainers; [ np ]; 68 }; 69}