nixpkgs/pkgs/development/python-modules/trezor/default.nix

49 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, fetchPypi, buildPythonPackage, isPy3k, python, pytest
, typing-extensions
, protobuf
, hidapi
, ecdsa
, mnemonic
, requests
, pyblake2
, click
, construct
, libusb1
, rlp
}:
2017-03-11 12:49:23 +00:00
buildPythonPackage rec {
pname = "trezor";
version = "0.11.1";
2017-03-11 12:49:23 +00:00
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "6043f321d856e1b45b9df0c37810264f08d065bb56cd999f61a05fe2906e9e18";
2017-03-11 12:49:23 +00:00
};
propagatedBuildInputs = [ typing-extensions protobuf hidapi ecdsa mnemonic requests pyblake2 click construct libusb1 rlp ];
2017-03-11 12:49:23 +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;
maintainers = with lib.maintainers; [ np prusnak ];
2017-03-11 12:49:23 +00:00
};
}