2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
2024-01-25 14:12:00 +00:00
|
|
|
, stdenv
|
2023-05-24 13:37:59 +00:00
|
|
|
, bleak
|
2022-04-15 01:41:22 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, ecpy
|
|
|
|
, fetchPypi
|
|
|
|
, 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
|
2023-05-24 13:37:59 +00:00
|
|
|
, pythonOlder
|
2024-05-15 15:35:15 +00:00
|
|
|
, pythonRelaxDepsHook
|
|
|
|
, setuptools
|
|
|
|
, setuptools-scm
|
2021-06-28 23:13:55 +00:00
|
|
|
, websocket-client
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ledgerblue";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.1.53";
|
|
|
|
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-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-j5FCQnp+MNrJ8zgYeLRuWF+Gdq0FwJeBYyJALb+H8So=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"protobuf"
|
|
|
|
];
|
|
|
|
|
|
|
|
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-01-25 14:12:00 +00:00
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isLinux [
|
|
|
|
bleak
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# No tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-04-15 01:41:22 +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 ];
|
|
|
|
};
|
|
|
|
}
|