summary refs log tree commit diff
path: root/pkgs/development/python-modules/hwi/default.nix
blob: 046dbc7bb4ff96cb6e493aa78c044d43bfba7c21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ lib
, bitbox02
, buildPythonPackage
, cbor
, ecdsa
, fetchFromGitHub
, hidapi
, libusb1
, mnemonic
, pyaes
, pyserial
, pythonOlder
, typing-extensions
}:

buildPythonPackage rec {
  pname = "hwi";
  version = "2.3.1";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "bitcoin-core";
    repo = "HWI";
    rev = "refs/tags/${version}";
    hash = "sha256-V4BWB4mCONQ8kjAy6ySonAbCUTaKpBTvhSnHmoH8TQM=";
  };

  propagatedBuildInputs = [
    bitbox02
    cbor
    ecdsa
    hidapi
    libusb1
    mnemonic
    pyaes
    pyserial
    typing-extensions
  ];

  # Tests require to clone quite a few firmwares
  doCheck = false;

  pythonImportsCheck = [
    "hwilib"
  ];

  meta = with lib; {
    description = "Bitcoin Hardware Wallet Interface";
    homepage = "https://github.com/bitcoin-core/hwi";
    changelog = "https://github.com/bitcoin-core/HWI/releases/tag/${version}";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ prusnak ];
  };
}