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