1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 ecdsa,
6 hidapi,
7 libusb1,
8 mnemonic,
9 protobuf,
10 pytest,
11}:
12
13buildPythonPackage rec {
14 pname = "keepkey";
15 version = "7.2.1";
16 format = "setuptools";
17
18 src = fetchFromGitHub {
19 owner = "keepkey";
20 repo = "python-keepkey";
21 rev = "v${version}";
22 sha256 = "00hqppdj3s9y25x4ad59y8axq94dd4chhw9zixq32sdrd9v8z55a";
23 };
24
25 propagatedBuildInputs = [
26 ecdsa
27 hidapi
28 libusb1
29 mnemonic
30 protobuf
31 ];
32
33 nativeCheckInputs = [ pytest ];
34
35 # tests requires hardware
36 doCheck = false;
37
38 # Remove impossible dependency constraint
39 postPatch = "sed -i -e 's|hidapi==|hidapi>=|' setup.py";
40
41 meta = with lib; {
42 description = "KeepKey Python client";
43 mainProgram = "keepkeyctl";
44 homepage = "https://github.com/keepkey/python-keepkey";
45 license = licenses.gpl3;
46 maintainers = with maintainers; [ np ];
47 };
48}