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