2020-08-20 17:08:02 +00:00
|
|
|
{ lib
|
2021-01-09 10:05:03 +00:00
|
|
|
, bitbox02
|
2023-08-22 20:05:09 +00:00
|
|
|
, buildPythonPackage
|
2022-04-27 09:35:20 +00:00
|
|
|
, cbor
|
2020-08-20 17:08:02 +00:00
|
|
|
, ecdsa
|
2023-08-22 20:05:09 +00:00
|
|
|
, fetchFromGitHub
|
2020-08-20 17:08:02 +00:00
|
|
|
, hidapi
|
|
|
|
, libusb1
|
2021-01-09 10:05:03 +00:00
|
|
|
, mnemonic
|
2020-08-20 17:08:02 +00:00
|
|
|
, pyaes
|
2022-04-27 09:35:20 +00:00
|
|
|
, pyserial
|
2022-01-19 23:45:15 +00:00
|
|
|
, pythonOlder
|
2023-08-22 20:05:09 +00:00
|
|
|
, typing-extensions
|
2020-08-20 17:08:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hwi";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "2.3.1";
|
2022-01-19 23:45:15 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bitcoin-core";
|
|
|
|
repo = "HWI";
|
2023-03-04 12:14:45 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-V4BWB4mCONQ8kjAy6ySonAbCUTaKpBTvhSnHmoH8TQM=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-01-09 10:05:03 +00:00
|
|
|
bitbox02
|
2022-04-27 09:35:20 +00:00
|
|
|
cbor
|
2020-08-20 17:08:02 +00:00
|
|
|
ecdsa
|
|
|
|
hidapi
|
|
|
|
libusb1
|
2021-01-09 10:05:03 +00:00
|
|
|
mnemonic
|
2020-08-20 17:08:02 +00:00
|
|
|
pyaes
|
2022-04-27 09:35:20 +00:00
|
|
|
pyserial
|
2021-03-19 17:17:44 +00:00
|
|
|
typing-extensions
|
2020-08-20 17:08:02 +00:00
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
# Tests require to clone quite a few firmwares
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"hwilib"
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
meta = with lib; {
|
2020-08-20 17:08:02 +00:00
|
|
|
description = "Bitcoin Hardware Wallet Interface";
|
|
|
|
homepage = "https://github.com/bitcoin-core/hwi";
|
2023-08-22 20:05:09 +00:00
|
|
|
changelog = "https://github.com/bitcoin-core/HWI/releases/tag/${version}";
|
2022-01-19 23:45:15 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ prusnak ];
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|