2024-08-25 19:22:51 +00:00
|
|
|
{
|
|
|
|
fetchFromGitHub,
|
|
|
|
installShellFiles,
|
|
|
|
lib,
|
|
|
|
python3Packages,
|
|
|
|
versionCheckHook,
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "pytr";
|
2024-09-24 21:46:35 +00:00
|
|
|
version = "0.2.5";
|
2024-08-25 19:22:51 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pytr-org";
|
|
|
|
repo = "pytr";
|
2024-09-07 20:31:42 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-24 21:46:35 +00:00
|
|
|
hash = "sha256-9FKG4QgRBU+DaaYJIDMDqqxFMCAguv5iRUUrQr6RMz8=";
|
2024-08-25 19:22:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
build-system = with python3Packages; [
|
|
|
|
babel
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = with python3Packages; [
|
|
|
|
babel
|
|
|
|
certifi
|
|
|
|
coloredlogs
|
|
|
|
ecdsa
|
|
|
|
packaging
|
|
|
|
pathvalidate
|
|
|
|
pygments
|
|
|
|
requests-futures
|
|
|
|
shtab
|
|
|
|
websockets
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd pytr \
|
|
|
|
--bash <($out/bin/pytr completion bash) \
|
|
|
|
--zsh <($out/bin/pytr completion zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeCheckInputs = [ versionCheckHook ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pytr" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/pytr-org/pytr/releases/tag/${version}";
|
|
|
|
description = "Use TradeRepublic in terminal and mass download all documents";
|
|
|
|
homepage = "https://github.com/pytr-org/pytr";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
mainProgram = "pytr";
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|