nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # Build system
7 hatchling,
8 hatch-fancy-pypi-readme,
9
10 # Dependencies
11 ffmpeg,
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
28 # Optional dependencies
29 ipython,
30 manim,
31 manimgl,
32 setuptools,
33 pyqt6,
34 pyside6,
35 docutils,
36}:
37buildPythonPackage rec {
38 pname = "manim-slides";
39 version = "5.5.3";
40 pyproject = true;
41
42 src = fetchFromGitHub {
43 owner = "jeertmans";
44 repo = "manim-slides";
45 tag = "v${version}";
46 hash = "sha256-BZyvnjRjWSgfbnLPgZbaTp0auDBXZawDlrr9jZfWohA=";
47 };
48
49 build-system = [
50 hatchling
51 hatch-fancy-pypi-readme
52 ];
53
54 pythonRelaxDeps = [
55 "rtoml" # We only package version 0.10, but manim-slides depends on 0.11.
56 ];
57 pythonRemoveDeps = [
58 "av" # It can use ffmpeg, which we already provide.
59 ];
60
61 dependencies = [
62 ffmpeg
63 beautifulsoup4
64 click
65 click-default-group
66 jinja2
67 lxml
68 numpy
69 pillow
70 pydantic
71 pydantic-extra-types
72 python-pptx
73 qtpy
74 requests
75 rich
76 rtoml
77 tqdm
78 ];
79
80 optional-dependencies = lib.fix (self: {
81 full = self.magic ++ self.manim ++ self.sphinx-directive;
82 magic = self.manim ++ [
83 ipython
84 ];
85 manim = [
86 manim
87 ];
88 manimgl = [
89 manimgl
90 setuptools
91 ];
92 pyqt6 = [
93 pyqt6
94 ];
95 pyqt6-full = self.full ++ self.pyqt6;
96 pyside6 = [
97 pyside6
98 ];
99 pyside6-full = self.full ++ self.pyside6;
100 sphinx-directive = self.manim ++ [
101 docutils
102 ];
103 });
104
105 pythonImportsCheck = [
106 "manim_slides"
107 ];
108
109 meta = {
110 changelog = "https://github.com/jeertmans/manim-slides/blob/${src.tag}/CHANGELOG.md";
111 description = "Tool for live presentations using manim";
112 homepage = "https://github.com/jeertmans/manim-slides";
113 license = lib.licenses.mit;
114 mainProgram = "manim-slides";
115 maintainers = [ lib.maintainers.bpeetz ];
116 };
117}