evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / py / pytr / package.nix
blob6c1e92a9419a3196219b8687bf44c0862447e589
2   fetchFromGitHub,
3   installShellFiles,
4   lib,
5   python3Packages,
6   versionCheckHook,
7 }:
9 python3Packages.buildPythonApplication rec {
10   pname = "pytr";
11   version = "0.3.0";
12   pyproject = true;
14   src = fetchFromGitHub {
15     owner = "pytr-org";
16     repo = "pytr";
17     rev = "refs/tags/v${version}";
18     hash = "sha256-sMDWL0lA5iJ2v2dhUIhMgSZ1vk7LjkNMYZGiJRpd3XY=";
19   };
21   build-system = with python3Packages; [
22     babel
23     setuptools
24   ];
26   dependencies = with python3Packages; [
27     babel
28     certifi
29     coloredlogs
30     ecdsa
31     packaging
32     pathvalidate
33     pygments
34     requests-futures
35     shtab
36     websockets
37   ];
39   nativeBuildInputs = [ installShellFiles ];
41   postInstall = ''
42     installShellCompletion --cmd pytr \
43       --bash <($out/bin/pytr completion bash) \
44       --zsh <($out/bin/pytr completion zsh)
45   '';
47   nativeCheckInputs = [ versionCheckHook ];
49   pythonImportsCheck = [ "pytr" ];
51   meta = {
52     changelog = "https://github.com/pytr-org/pytr/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
53     description = "Use TradeRepublic in terminal and mass download all documents";
54     homepage = "https://github.com/pytr-org/pytr";
55     license = lib.licenses.mit;
56     mainProgram = "pytr";
57     maintainers = with lib.maintainers; [ dotlambda ];
58   };