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
|
2019-07-31 18:52:54 +01:00
|
|
|
, shamir-mnemonic
|
2019-10-27 13:17:02 +00:00
|
|
|
, trezor-udev-rules
|
2017-06-22 13:27:11 +01:00
|
|
|
}:
|
2017-03-11 12:49:23 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "trezor";
|
2019-12-30 12:33:35 +00:00
|
|
|
version = "0.11.6";
|
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-12-30 12:33:35 +00:00
|
|
|
sha256 = "1i73j812i0dgjw9n106pipc6qksd9cgs59d0as0b4j5iyl0087hh";
|
2017-03-11 12:49:23 +00:00
|
|
|
};
|
|
|
|
|
2019-10-27 13:17:02 +00:00
|
|
|
propagatedBuildInputs = [ typing-extensions protobuf hidapi ecdsa mnemonic requests pyblake2 click construct libusb1 rlp shamir-mnemonic trezor-udev-rules ];
|
2017-03-11 12:49:23 +00:00
|
|
|
|
2018-12-23 21:50:58 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
# disable test_tx_api.py as it requires being online
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
2019-09-26 16:48:42 +01:00
|
|
|
pytest --pyargs tests --ignore tests/test_tx_api.py
|
2018-12-23 21:50:58 +00:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
2017-03-11 12:49:23 +00:00
|
|
|
|
2019-08-18 20:16:19 +01:00
|
|
|
meta = with lib; {
|
2017-03-11 12:49:23 +00:00
|
|
|
description = "Python library for communicating with TREZOR Bitcoin Hardware Wallet";
|
2019-07-31 18:52:54 +01:00
|
|
|
homepage = "https://github.com/trezor/trezor-firmware/tree/master/python";
|
2019-08-18 20:16:19 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ np prusnak mmahut maintainers."1000101" ];
|
2017-03-11 12:49:23 +00:00
|
|
|
};
|
|
|
|
}
|