1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6
7 hatchling,
8 hatch-fancy-pypi-readme,
9 manim,
10 ffmpeg,
11
12 beautifulsoup4,
13 click,
14 click-default-group,
15 jinja2,
16 lxml,
17 numpy,
18 pillow,
19 pydantic,
20 pydantic-extra-types,
21 python-pptx,
22 qtpy,
23 requests,
24 rich,
25 rtoml,
26 tqdm,
27 pyqt6,
28
29 # Optional dependencies
30 ipython,
31
32 # As Module or application?
33 withGui ? false,
34}:
35buildPythonPackage rec {
36 pname = "manim-slides";
37 version = "5.5.1";
38 pyproject = true;
39
40 disabled = pythonOlder "3.9";
41
42 src = fetchFromGitHub {
43 owner = "jeertmans";
44 repo = "manim-slides";
45 tag = "v${version}";
46 hash = "sha256-V1uopwyA6y+oTofaezA4pR+ewrh0TRmCwoYhIR/iH7I=";
47 };
48
49 build-system = [
50 hatchling
51 hatch-fancy-pypi-readme
52 ];
53
54 pythonRelaxDeps = [
55 "rtoml"
56 "qtpy"
57 ];
58
59 dependencies = [
60 beautifulsoup4
61 click
62 click-default-group
63 jinja2
64 lxml
65 numpy
66 pillow
67 pydantic
68 pydantic-extra-types
69 python-pptx
70 qtpy
71 requests
72 rich
73 rtoml
74 tqdm
75
76 # avconv is a potential alternative
77 ffmpeg
78 # This could also be manimgl, but that is not (yet) packaged
79 manim
80 ]
81 ++ lib.lists.optional (!withGui) ipython
82 ++
83 lib.lists.optional withGui
84 # dependency of qtpy (could also be pyqt5)
85 pyqt6;
86
87 pythonImportsCheck = [ "manim_slides" ];
88
89 meta = {
90 changelog = "https://github.com/jeertmans/manim-slides/blob/${src.tag}/CHANGELOG.md";
91 description = "Tool for live presentations using manim";
92 homepage = "https://github.com/jeertmans/manim-slides";
93 license = lib.licenses.mit;
94 mainProgram = "manim-slides";
95 maintainers = with lib.maintainers; [ bpeetz ];
96 };
97}