1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 7 hatchling, 8 pythonRelaxDepsHook, 9 manim, 10 ffmpeg, 11 12 av, 13 click, 14 click-default-group, 15 jinja2, 16 lxml, 17 numpy, 18 opencv4, 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.6"; 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-BFfp/jeKBXr+Ukh0jNEtMPHlstlBjhSnvA803ddYoZE="; 48 }; 49 50 build-system = [ 51 hatchling 52 pythonRelaxDepsHook 53 ]; 54 55 pythonRemoveDeps = [ "opencv-python" ]; 56 57 pythonRelaxDeps = [ 58 "rtoml" 59 "qtpy" 60 ]; 61 62 dependencies = 63 [ 64 av 65 click 66 click-default-group 67 jinja2 68 lxml 69 numpy 70 opencv4 71 pillow 72 pydantic 73 pydantic-extra-types 74 python-pptx 75 qtpy 76 requests 77 rich 78 rtoml 79 tqdm 80 81 # avconv is a potential alternative 82 ffmpeg 83 # This could also be manimgl, but that is not (yet) packaged 84 manim 85 ] 86 ++ lib.lists.optional (!withGui) ipython 87 ++ 88 lib.lists.optional withGui 89 # dependency of qtpy (could also be pyqt5) 90 pyqt6; 91 92 pythonImportsCheck = [ "manim_slides" ]; 93 94 meta = with lib; { 95 changelog = "https://github.com/jeertmans/manim-slides/blob/${src.rev}/CHANGELOG.md"; 96 description = "Tool for live presentations using manim"; 97 homepage = "https://github.com/jeertmans/manim-slides"; 98 license = licenses.mit; 99 mainProgram = "manim-slides"; 100 maintainers = with maintainers; [ soispha ]; 101 }; 102}