1{
2 lib,
3 bash,
4 buildPythonPackage,
5 fetchFromGitHub,
6 fetchpatch,
7 setuptools,
8 discordpy,
9 click,
10 braceexpand,
11 import-expression,
12 tabulate,
13 pytestCheckHook,
14 pytest-asyncio,
15 youtube-dl,
16}:
17buildPythonPackage rec {
18 pname = "jishaku";
19 version = "2.6.0";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "Gorialis";
24 repo = "jishaku";
25 tag = version;
26 hash = "sha256-+J8Tr8jPN9K3eHLOuJTaP3We5A1kiyn9/yI1KChbuMY=";
27 };
28
29 patches = [
30 (fetchpatch {
31 # add entrypoint for install script
32 url = "https://github.com/Gorialis/jishaku/commit/b96cd55a1c2fd154c548f08019ccd6f7be9c7f90.patch";
33 hash = "sha256-laPoupwCC1Zthib8G+c1BXqTwZK0Z6up1DKVkhFicJ0=";
34 })
35 ];
36
37 postPatch = ''
38 substituteInPlace jishaku/shell.py \
39 --replace-fail '"/bin/bash"' '"${lib.getExe bash}"'
40 '';
41
42 build-system = [ setuptools ];
43
44 dependencies = [
45 discordpy
46 click
47 braceexpand
48 tabulate
49 import-expression
50 ];
51
52 nativeCheckInputs = [
53 pytestCheckHook
54 pytest-asyncio
55 youtube-dl
56 ];
57
58 pythonImportsCheck = [
59 "jishaku"
60 "jishaku.repl"
61 "jishaku.features"
62 ];
63
64 meta = {
65 description = "Debugging and testing cog for discord.py bots";
66 homepage = "https://jishaku.readthedocs.io/en/latest";
67 changelog = "https://github.com/Gorialis/jishaku/releases/tag/${src.tag}";
68 maintainers = with lib.maintainers; [ ];
69 mainProgram = "jishaku";
70 license = lib.licenses.mit;
71 };
72}