1{
2 lib,
3 bitbox02,
4 buildPythonPackage,
5 cbor,
6 ecdsa,
7 fetchFromGitHub,
8 hidapi,
9 libusb1,
10 mnemonic,
11 pyaes,
12 pyserial,
13 pythonOlder,
14 typing-extensions,
15}:
16
17buildPythonPackage rec {
18 pname = "hwi";
19 version = "3.1.0";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "bitcoin-core";
26 repo = "HWI";
27 tag = version;
28 hash = "sha256-sQqft+5M+X+91bFqpUrbDRrFzpe/l1+w+pnIHwqezR8=";
29 };
30
31 propagatedBuildInputs = [
32 bitbox02
33 cbor
34 ecdsa
35 hidapi
36 libusb1
37 mnemonic
38 pyaes
39 pyserial
40 typing-extensions
41 ];
42
43 # Tests require to clone quite a few firmwares
44 doCheck = false;
45
46 pythonImportsCheck = [ "hwilib" ];
47
48 meta = with lib; {
49 description = "Bitcoin Hardware Wallet Interface";
50 homepage = "https://github.com/bitcoin-core/hwi";
51 changelog = "https://github.com/bitcoin-core/HWI/releases/tag/${version}";
52 license = with licenses; [ mit ];
53 maintainers = with maintainers; [ prusnak ];
54 };
55}