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