depot/third_party/nixpkgs/pkgs/development/python-modules/hwi/default.nix
Default email 620eecebfb Project import generated by Copybara.
GitOrigin-RevId: 2deb07f3ac4eeb5de1c12c4ba2911a2eb1f6ed61
2021-10-28 08:52:43 +02:00

51 lines
954 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, bitbox02
, ecdsa
, hidapi
, libusb1
, mnemonic
, pyaes
, typing-extensions
}:
buildPythonPackage rec {
pname = "hwi";
version = "2.0.2";
src = fetchFromGitHub {
owner = "bitcoin-core";
repo = "HWI";
rev = version;
sha256 = "sha256-s0pKYqesZjHE6YndqsMwCuqLK7eE82oRiSXxBdUtEX4=";
};
propagatedBuildInputs = [
bitbox02
ecdsa
hidapi
libusb1
mnemonic
pyaes
typing-extensions
];
# make compatible with libusb1 2.x
postPatch = ''
substituteInPlace setup.py \
--replace 'libusb1>=1.7,<2.0' 'libusb1>=1.7'
'';
# tests require to clone quite a few firmwares
doCheck = false;
pythonImportsCheck = [ "hwilib" ];
meta = {
description = "Bitcoin Hardware Wallet Interface";
homepage = "https://github.com/bitcoin-core/hwi";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ prusnak ];
};
}