mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-02 21:54:45 +00:00
66 lines
1.4 KiB
Nix
66 lines
1.4 KiB
Nix
{
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
lib,
|
|
stdenv,
|
|
python3Packages,
|
|
versionCheckHook,
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "pytr";
|
|
version = "0.4.10";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pytr-org";
|
|
repo = "pytr";
|
|
tag = "v${version}";
|
|
hash = "sha256-xo/J0POH21mLm//+gpfhuxIGdKGHJpFbpL82TIDufrM=";
|
|
};
|
|
|
|
build-system = with python3Packages; [
|
|
hatchling
|
|
hatch-babel
|
|
];
|
|
|
|
dependencies = with python3Packages; [
|
|
babel
|
|
certifi
|
|
coloredlogs
|
|
cryptography
|
|
curl-cffi
|
|
packaging
|
|
pathvalidate
|
|
playwright
|
|
pygments
|
|
requests-futures
|
|
shtab
|
|
websockets
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd pytr \
|
|
--bash <($out/bin/pytr completion bash) \
|
|
--zsh <($out/bin/pytr completion zsh)
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
versionCheckHook
|
|
python3Packages.pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "pytr" ];
|
|
|
|
meta = {
|
|
changelog = "https://github.com/pytr-org/pytr/releases/tag/${src.tag}";
|
|
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 ];
|
|
};
|
|
}
|