2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
bleak,
|
|
|
|
buildPythonPackage,
|
|
|
|
ecpy,
|
|
|
|
fetchPypi,
|
|
|
|
future,
|
|
|
|
hidapi,
|
|
|
|
nfcpy,
|
|
|
|
pillow,
|
|
|
|
protobuf,
|
|
|
|
pycrypto,
|
|
|
|
pycryptodomex,
|
|
|
|
pyelftools,
|
|
|
|
python-gnupg,
|
|
|
|
python-u2flib-host,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
websocket-client,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ledgerblue";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.1.54";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-Hn99ST6RnER6XI6+rqA3O9/aC+whYoTOzeoHGF/fFz4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "protobuf" ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
dependencies = [
|
2022-04-15 01:41:22 +00:00
|
|
|
ecpy
|
|
|
|
future
|
|
|
|
hidapi
|
2023-05-24 13:37:59 +00:00
|
|
|
nfcpy
|
2022-04-15 01:41:22 +00:00
|
|
|
pillow
|
|
|
|
protobuf
|
|
|
|
pycrypto
|
|
|
|
pycryptodomex
|
2023-05-24 13:37:59 +00:00
|
|
|
pyelftools
|
2024-05-15 15:35:15 +00:00
|
|
|
python-gnupg
|
2022-04-15 01:41:22 +00:00
|
|
|
python-u2flib-host
|
|
|
|
websocket-client
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [ bleak ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# No tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "ledgerblue" ];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python library to communicate with Ledger Blue/Nano S";
|
|
|
|
homepage = "https://github.com/LedgerHQ/blue-loader-python";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ np ];
|
|
|
|
};
|
|
|
|
}
|