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 [
61 beautifulsoup4
62 click
63 click-default-group
64 jinja2
65 lxml
66 numpy
67 pillow
68 pydantic
69 pydantic-extra-types
70 python-pptx
71 qtpy
72 requests
73 rich
74 rtoml
75 tqdm
76
77 # avconv is a potential alternative
78 ffmpeg
79 # This could also be manimgl, but that is not (yet) packaged
80 manim
81 ]
82 ++ lib.lists.optional (!withGui) ipython
83 ++
84 lib.lists.optional withGui
85 # dependency of qtpy (could also be pyqt5)
86 pyqt6;
87
88 pythonImportsCheck = [ "manim_slides" ];
89
90 meta = {
91 changelog = "https://github.com/jeertmans/manim-slides/blob/${src.tag}/CHANGELOG.md";
92 description = "Tool for live presentations using manim";
93 homepage = "https://github.com/jeertmans/manim-slides";
94 license = lib.licenses.mit;
95 mainProgram = "manim-slides";
96 maintainers = with lib.maintainers; [ bpeetz ];
97 };
98}