Skip to content

Commit fd281bd

Browse files
authored
Merge pull request #275577 from soispha/master
manim-slides: Init at v5.1.3
2 parents 75a18a6 + 7a3ed2f commit fd281bd

File tree

5 files changed

+121
-0
lines changed

5 files changed

+121
-0
lines changed

pkgs/applications/video/manim/default.nix

+2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ in python.pkgs.buildPythonApplication rec {
6464

6565
pythonRelaxDeps = [
6666
"cloup"
67+
"isosurfaces"
6768
"pillow"
6869
"skia-pathops"
70+
"watchdog"
6971
];
7072

7173
patches = [

pkgs/applications/video/manim/failing_tests.nix

+15
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,21 @@
6464
"test_PointCloudDot"
6565
"test_Torus"
6666

67+
# test_ImplicitFunction[/test_implicit_graph] failing with:
68+
# E AssertionError:
69+
# E Not equal to tolerance rtol=1e-07, atol=1.01
70+
# E Frame no -1. You can use --show_diff to visually show the difference.
71+
# E Mismatched elements: 1185[/633] / 1639680[/1639680] (0.0723[/0.0386]%)
72+
# E Max absolute difference: 125[/121]
73+
# E Max relative difference: 6.5[/1]
74+
#
75+
# These started failing after relaxing the “watchdog” and “isosurfaces” dependencies,
76+
# likely due to a tolerance difference. They should, however, start working again when [1] is
77+
# included in a Manim release.
78+
# [1]: https://github.com/ManimCommunity/manim/pull/3376
79+
"test_ImplicitFunction"
80+
"test_implicit_graph"
81+
6782
# failing with:
6883
# TypeError: __init__() got an unexpected keyword argument 'msg' - maybe you meant pytest.mark.skipif?
6984
"test_force_window_opengl_render_with_movies"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{ lib
2+
, buildPythonPackage
3+
, fetchFromGitHub
4+
, pythonOlder
5+
6+
, manim
7+
, ffmpeg
8+
9+
, av
10+
, click
11+
, click-default-group
12+
, jinja2
13+
, lxml
14+
, numpy
15+
, opencv4
16+
, pillow
17+
, pydantic
18+
, pydantic-extra-types
19+
, python-pptx
20+
, qtpy
21+
, requests
22+
, rich
23+
, rtoml
24+
, tqdm
25+
, pyqt6
26+
27+
# Optional dependencies
28+
, ipython
29+
30+
# Hooks
31+
, pdm-backend
32+
, pythonRelaxDepsHook
33+
34+
# As Module or application?
35+
, withGui ? false
36+
}:
37+
buildPythonPackage rec {
38+
pname = "manim-slides";
39+
format = "pyproject";
40+
version = "5.1.3";
41+
42+
disabled = pythonOlder "3.9";
43+
44+
src = fetchFromGitHub {
45+
owner = "jeertmans";
46+
repo = "manim-slides";
47+
rev = "refs/tags/v${version}";
48+
hash = "sha256-WZR95swapT2Fbu6mbuHLjMu3Okq/wKFabzN7xpZw0/g=";
49+
};
50+
51+
nativeBuildInputs = [ pdm-backend pythonRelaxDepsHook ];
52+
53+
pythonRemoveDeps = [ "opencv-python" ];
54+
55+
pythonRelaxDeps = [ "rtoml" "qtpy" ];
56+
57+
propagatedBuildInputs = [
58+
av
59+
click
60+
click-default-group
61+
jinja2
62+
lxml
63+
numpy
64+
opencv4
65+
pillow
66+
pydantic
67+
pydantic-extra-types
68+
python-pptx
69+
qtpy
70+
requests
71+
rich
72+
rtoml
73+
tqdm
74+
75+
# avconv is a potential alternative
76+
ffmpeg
77+
# This could also be manimgl, but that is not (yet) packaged
78+
manim
79+
]
80+
++ lib.lists.optional (!withGui)
81+
ipython
82+
++ lib.lists.optional withGui
83+
# dependency of qtpy (could also be pyqt5)
84+
pyqt6;
85+
86+
pythonImportsCheck = [ "manim_slides" ];
87+
88+
meta = with lib; {
89+
changelog = "https://github.com/jeertmans/manim-slides/blob/${src.rev}/CHANGELOG.md";
90+
description = "Tool for live presentations using manim";
91+
homepage = "https://github.com/jeertmans/manim-slides";
92+
license = licenses.mit;
93+
mainProgram = "manim-slides";
94+
maintainers = with maintainers; [ soispha ];
95+
};
96+
}

pkgs/top-level/all-packages.nix

+6
Original file line numberDiff line numberDiff line change
@@ -31597,6 +31597,12 @@ with pkgs;
3159731597

3159831598
manim = callPackage ../applications/video/manim { };
3159931599

31600+
manim-slides = python3Packages.toPythonApplication (
31601+
python3Packages.manim-slides.override {
31602+
withGui = true;
31603+
}
31604+
);
31605+
3160031606
manuskript = libsForQt5.callPackage ../applications/editors/manuskript { };
3160131607

3160231608
mindforger = libsForQt5.callPackage ../applications/editors/mindforger { };

pkgs/top-level/python-packages.nix

+2
Original file line numberDiff line numberDiff line change
@@ -7048,6 +7048,8 @@ self: super: with self; {
70487048
inherit (pkgs.darwin.apple_sdk.frameworks) AppKit;
70497049
};
70507050

7051+
manim-slides = callPackage ../development/python-modules/manim-slides { };
7052+
70517053
manifest-ml = callPackage ../development/python-modules/manifest-ml { };
70527054

70537055
manifestoo = callPackage ../development/python-modules/manifestoo { };

0 commit comments

Comments
 (0)