2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
click,
|
|
|
|
construct,
|
|
|
|
construct-classes,
|
|
|
|
ecdsa,
|
|
|
|
libusb1,
|
|
|
|
mnemonic,
|
|
|
|
requests,
|
2024-07-27 06:49:29 +00:00
|
|
|
setuptools,
|
2024-06-05 15:53:02 +00:00
|
|
|
typing-extensions,
|
|
|
|
trezor-udev-rules,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "trezor";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "0.13.9";
|
2024-07-27 06:49:29 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-lFC9e7nSPl4zo8nljhjwWLRMnZw0ymZLSYGnlaqfse8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [ setuptools ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
dependencies = [
|
2020-09-25 04:45:31 +00:00
|
|
|
click
|
|
|
|
construct
|
2022-11-21 17:40:18 +00:00
|
|
|
construct-classes
|
2020-09-25 04:45:31 +00:00
|
|
|
ecdsa
|
|
|
|
libusb1
|
|
|
|
mnemonic
|
|
|
|
requests
|
|
|
|
typing-extensions
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [ trezor-udev-rules ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/test_stellar.py" # requires stellar-sdk
|
2022-11-21 17:40:18 +00:00
|
|
|
"tests/test_firmware.py" # requires network downloads
|
2021-12-26 17:43:05 +00:00
|
|
|
];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
pythonImportsCheck = [ "trezorlib" ];
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
$out/bin/trezorctl --version
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "Python library for communicating with Trezor Hardware Wallet";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "trezorctl";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/trezor/trezor-firmware/tree/master/python";
|
2024-07-01 15:47:52 +00:00
|
|
|
changelog = "https://github.com/trezor/trezor-firmware/blob/python/v${version}/python/CHANGELOG.md";
|
2024-07-27 06:49:29 +00:00
|
|
|
license = licenses.lgpl3Only;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
np
|
|
|
|
prusnak
|
|
|
|
mmahut
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|