2020-07-15 15:37:51 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-01-03 21:33:12 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, bitbox02
|
2020-07-15 15:37:51 +01:00
|
|
|
, ecdsa
|
|
|
|
, hidapi
|
|
|
|
, libusb1
|
2021-01-03 21:33:12 +00:00
|
|
|
, mnemonic
|
2020-07-15 15:37:51 +01:00
|
|
|
, pyaes
|
2021-03-05 22:23:06 +00:00
|
|
|
, typing-extensions
|
2020-07-15 15:37:51 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hwi";
|
2021-03-27 18:23:14 +00:00
|
|
|
version = "2.0.1";
|
2020-07-15 15:37:51 +01:00
|
|
|
|
2021-01-03 21:33:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bitcoin-core";
|
|
|
|
repo = "HWI";
|
|
|
|
rev = version;
|
2021-03-27 18:23:14 +00:00
|
|
|
sha256 = "148m0vgwm6l8drcx6j3fjs2zpdzvslk4w2nkb8nm0g8qdlm6gjlw";
|
2020-07-15 15:37:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-01-03 21:33:12 +00:00
|
|
|
bitbox02
|
2020-07-15 15:37:51 +01:00
|
|
|
ecdsa
|
|
|
|
hidapi
|
|
|
|
libusb1
|
2021-01-03 21:33:12 +00:00
|
|
|
mnemonic
|
2020-07-15 15:37:51 +01:00
|
|
|
pyaes
|
2021-03-05 22:23:06 +00:00
|
|
|
typing-extensions
|
2020-07-15 15:37:51 +01:00
|
|
|
];
|
|
|
|
|
2021-01-03 21:33:12 +00:00
|
|
|
# tests require to clone quite a few firmwares
|
2020-07-15 15:37:51 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-03 21:33:12 +00:00
|
|
|
pythonImportsCheck = [ "hwilib" ];
|
2020-07-15 15:37:51 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Bitcoin Hardware Wallet Interface";
|
|
|
|
homepage = "https://github.com/bitcoin-core/hwi";
|
|
|
|
license = with lib.licenses; [ mit ];
|
|
|
|
maintainers = with lib.maintainers; [ prusnak ];
|
|
|
|
};
|
|
|
|
}
|