1{ stdenv, fetchFromGitHub, buildPythonPackage, pytest
2, ecdsa , mnemonic, protobuf, hidapi, trezor }:
3
4buildPythonPackage rec {
5 name = "${pname}-${version}";
6 pname = "keepkey";
7 version = "4.0.0";
8
9 src = fetchFromGitHub {
10 owner = "keepkey";
11 repo = "python-keepkey";
12 rev = "v${version}";
13 sha256 = "144awjkc169z2n1ffirs697y6m97izh3pbh3sjhy3nji7jszh592";
14 };
15
16 propagatedBuildInputs = [ protobuf hidapi trezor ];
17
18 buildInputs = [ ecdsa mnemonic ];
19
20 checkInputs = [ pytest ];
21
22 # tests requires hardware
23 doCheck = false;
24
25 # Remove impossible dependency constraint
26 postPatch = "sed -i -e 's|hidapi==|hidapi>=|' setup.py";
27
28 meta = with stdenv.lib; {
29 description = "KeepKey Python client";
30 homepage = https://github.com/keepkey/python-keepkey;
31 license = licenses.gpl3;
32 maintainers = with maintainers; [ np ];
33 };
34}