Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 1.1 kB view raw
1{ lib, fetchPypi, buildPythonPackage, isPy3k, python, pytest 2, typing-extensions 3, protobuf 4, hidapi 5, ecdsa 6, mnemonic 7, requests 8, pyblake2 9, click 10, construct 11, libusb1 12, rlp 13}: 14 15buildPythonPackage rec { 16 pname = "trezor"; 17 version = "0.11.2"; 18 19 disabled = !isPy3k; 20 21 src = fetchPypi { 22 inherit pname version; 23 sha256 = "a6f4b47b37a21247535fc43411cb70a8c61ef0a5a2dfee668bd05611e2741fb8"; 24 }; 25 26 propagatedBuildInputs = [ typing-extensions protobuf hidapi ecdsa mnemonic requests pyblake2 click construct libusb1 rlp ]; 27 28 # build requires UTF-8 locale 29 LANG = "en_US.UTF-8"; 30 31 checkInputs = [ 32 pytest 33 ]; 34 35 # disable test_tx_api.py as it requires being online 36 checkPhase = '' 37 runHook preCheck 38 ${python.interpreter} -m pytest --pyarg trezorlib.tests.unit_tests --ignore trezorlib/tests/unit_tests/test_tx_api.py 39 runHook postCheck 40 ''; 41 42 meta = { 43 description = "Python library for communicating with TREZOR Bitcoin Hardware Wallet"; 44 homepage = https://github.com/trezor/python-trezor; 45 license = lib.licenses.gpl3; 46 maintainers = with lib.maintainers; [ np prusnak ]; 47 }; 48}