about summary refs log tree commit diff
path: root/pkgs/applications/networking/p2p/pyrosimple/default.nix
blob: 15a9ce266e00d02b25ea39a0d135f708da5a698b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{ lib
, stdenv
, python3Packages
, nix-update-script
, pyrosimple
, testers
, fetchPypi
, buildPythonPackage
, bencode-py
, apscheduler
, jinja2
, python-daemon
, importlib-resources
, parsimonious
, prometheus-client
, prompt-toolkit
, requests
, shtab
, inotify
, withInotify ? stdenv.isLinux
, python-box
, tomli
, tomli-w
}:

let
  pname = "pyrosimple";
  version = "2.7.0";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-SMqzvTbWFHwnbMQ+6K0m1v+PybceQK5EHEuN8FB6SaU=";
  };

  propagatedBuildInputs = [
    bencode-py
    apscheduler
    jinja2
    python-daemon
    importlib-resources
    parsimonious
    prometheus-client
    prompt-toolkit
    requests
    shtab
    python-box
    tomli
    tomli-w
  ] ++ lib.optional withInotify inotify;

in buildPythonPackage {
  inherit pname version src propagatedBuildInputs;

  passthru = {
    updateScript = nix-update-script { };
    tests = testers.testVersion {
      package = pyrosimple;
      command = "pyroadmin --version";
    };
  };

  meta = let inherit (lib) licenses platforms maintainers;
  in {
    homepage = "https://kannibalox.github.io/pyrosimple/";
    description = "A rTorrent client and Python 3 fork of the pyrocore tools";
    license = licenses.gpl3Plus;
    changelog = "https://github.com/kannibalox/pyrosimple/blob/v${version}/CHANGELOG.md";
    platforms = platforms.all;
    maintainers = builtins.attrValues { inherit (maintainers) ne9z; };
  };

}