2018-12-23 21:50:58 +00:00
|
|
|
{ lib, fetchPypi, buildPythonPackage, isPy3k, python, pytest
|
|
|
|
, typing-extensions
|
|
|
|
, protobuf
|
|
|
|
, hidapi
|
|
|
|
, ecdsa
|
|
|
|
, mnemonic
|
|
|
|
, requests
|
|
|
|
, pyblake2
|
|
|
|
, click
|
|
|
|
, construct
|
|
|
|
, libusb1
|
|
|
|
, rlp
|
2017-06-22 13:27:11 +01:00
|
|
|
}:
|
2017-03-11 12:49:23 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "trezor";
|
2019-02-28 12:31:40 +00:00
|
|
|
version = "0.11.2";
|
2017-03-11 12:49:23 +00:00
|
|
|
|
2018-07-17 22:15:57 +01:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2017-05-31 21:40:14 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-02-28 12:31:40 +00:00
|
|
|
sha256 = "a6f4b47b37a21247535fc43411cb70a8c61ef0a5a2dfee668bd05611e2741fb8";
|
2017-03-11 12:49:23 +00:00
|
|
|
};
|
|
|
|
|
2018-12-23 21:50:58 +00:00
|
|
|
propagatedBuildInputs = [ typing-extensions protobuf hidapi ecdsa mnemonic requests pyblake2 click construct libusb1 rlp ];
|
2017-03-11 12:49:23 +00:00
|
|
|
|
2018-12-23 21:50:58 +00:00
|
|
|
# build requires UTF-8 locale
|
|
|
|
LANG = "en_US.UTF-8";
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
# disable test_tx_api.py as it requires being online
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} -m pytest --pyarg trezorlib.tests.unit_tests --ignore trezorlib/tests/unit_tests/test_tx_api.py
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
2017-03-11 12:49:23 +00:00
|
|
|
|
2017-05-31 07:33:02 +01:00
|
|
|
meta = {
|
2017-03-11 12:49:23 +00:00
|
|
|
description = "Python library for communicating with TREZOR Bitcoin Hardware Wallet";
|
|
|
|
homepage = https://github.com/trezor/python-trezor;
|
2017-05-31 07:33:02 +01:00
|
|
|
license = lib.licenses.gpl3;
|
2018-12-23 21:50:58 +00:00
|
|
|
maintainers = with lib.maintainers; [ np prusnak ];
|
2017-03-11 12:49:23 +00:00
|
|
|
};
|
|
|
|
}
|