about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/jishaku/default.nix
blob: e758f4c691ebffdbeaca984ec4dfd349bfe5f1f2 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  setuptools,
  discordpy,
  click,
  braceexpand,
  import-expression,
  tabulate,
  pytestCheckHook,
  pytest-asyncio,
  youtube-dl
}:
buildPythonPackage rec {
  pname = "jishaku";
  version = "2.5.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Gorialis";
    repo = pname;
    rev = "refs/tags/${version}";
    hash = "sha256-BWnuk6h80cKwRECyTuRvnYnTC78219oraeTNoqWDd1c=";
  };

  patches = [
    (fetchpatch {
      # add entrypoint for install script
      url = "https://github.com/Gorialis/jishaku/commit/b96cd55a1c2fd154c548f08019ccd6f7be9c7f90.patch";
      hash = "sha256-laPoupwCC1Zthib8G+c1BXqTwZK0Z6up1DKVkhFicJ0=";
    })
  ];

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = [
    discordpy
    click
    braceexpand
    tabulate
    import-expression
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-asyncio
    youtube-dl
  ];

  pythonImportsCheck = [
    "jishaku"
    "jishaku.repl"
    "jishaku.features"
  ];

  meta = {
    description = "A debugging and testing cog for discord.py bots";
    homepage = "https://jishaku.readthedocs.io/en/latest";
    changelog = "https://github.com/Gorialis/jishaku/releases/tag/${version}";
    maintainers = with lib.maintainers; [ lychee ];
    mainProgram = "jishaku";
    license = lib.licenses.mit;
  };
}