diff options
Diffstat (limited to 'pkgs/applications/video/manim')
-rw-r--r-- | pkgs/applications/video/manim/default.nix | 53 | ||||
-rw-r--r-- | pkgs/applications/video/manim/failing_tests.nix | 3 | ||||
-rw-r--r-- | pkgs/applications/video/manim/pytest-report-header.patch | 22 |
3 files changed, 42 insertions, 36 deletions
diff --git a/pkgs/applications/video/manim/default.nix b/pkgs/applications/video/manim/default.nix index c4443af00db..70b3ad8e1e4 100644 --- a/pkgs/applications/video/manim/default.nix +++ b/pkgs/applications/video/manim/default.nix @@ -1,10 +1,9 @@ { lib , fetchFromGitHub -, fetchPypi , cairo , ffmpeg -, texlive +, texliveInfraOnly , python3 }: @@ -21,11 +20,10 @@ let # https://github.com/yihui/tinytex/blob/master/tools/pkgs-custom.txt # # these two combined add up to: - manim-tinytex = { - inherit (texlive) + manim-tinytex = texliveInfraOnly.withPackages (ps: with ps; [ # tinytex - scheme-infraonly amsfonts amsmath atbegshi atveryend auxhook babel bibtex + amsfonts amsmath atbegshi atveryend auxhook babel bibtex bigintcalc bitset booktabs cm dehyph dvipdfmx dvips ec epstopdf-pkg etex etexcmds etoolbox euenc everyshi fancyvrb filehook firstaid float fontspec framed geometry gettitlestring glyphlist graphics graphics-cfg graphics-def @@ -41,54 +39,36 @@ let # manim-latex standalone everysel preview doublestroke ms setspace rsfs relsize ragged2e fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super - babel-english gnu-freefont mathastext cbfonts-fd; - }; + babel-english gnu-freefont mathastext cbfonts-fd + ]); - python = python3.override { - packageOverrides = self: super: { - networkx = super.networkx.overridePythonAttrs (oldAttrs: rec { - pname = "networkx"; - version = "2.8.8"; - src = fetchPypi { - inherit pname version; - hash = "sha256-Iw04gRevhw/OVkejxSQB/PdT6Ucg5uprQZelNVZIiF4="; - }; - }); - - watchdog = super.watchdog.overridePythonAttrs (oldAttrs: rec{ - pname = "watchdog"; - version = "2.3.1"; - src = fetchPypi { - inherit pname version; - hash = "sha256-2fntJu0iqdMxggqEMsNoBwfqi1QSHdzJ3H2fLO6zaQY="; - }; - }); - }; - }; + python = python3; in python.pkgs.buildPythonApplication rec { pname = "manim"; - format = "pyproject"; - version = "0.16.0.post0"; + pyproject = true; + version = "0.18.0"; disabled = python3.pythonOlder "3.8"; src = fetchFromGitHub { owner = "ManimCommunity"; - repo = pname; + repo = "manim"; rev = "refs/tags/v${version}"; - sha256 = "sha256-iXiPnI6lTP51P1X3iLp75ArRP66o8WAANBLoStPrz4M="; + sha256 = "sha256-TI7O0b1JvUZAxTj6XfpAJKhbGqrGnhcrE9eRJUVx4GM="; }; nativeBuildInputs = with python.pkgs; [ poetry-core ]; + patches = [ + ./pytest-report-header.patch + ]; + postPatch = '' substituteInPlace pyproject.toml \ --replace "--no-cov-on-fail --cov=manim --cov-report xml --cov-report term" "" \ --replace 'cloup = "^0.13.0"' 'cloup = "*"' \ - --replace 'mapbox-earcut = "^0.12.10"' 'mapbox-earcut = "*"' \ - --replace 'click = ">=7.2<=9.0"' 'click = ">=7.2,<=9.0"' # https://github.com/ManimCommunity/manim/pull/2954 ''; buildInputs = [ cairo ]; @@ -119,6 +99,7 @@ in python.pkgs.buildPythonApplication rec { screeninfo skia-pathops srt + svgelements tqdm watchdog ]; @@ -126,13 +107,13 @@ in python.pkgs.buildPythonApplication rec { makeWrapperArgs = [ "--prefix" "PATH" ":" (lib.makeBinPath [ ffmpeg - (texlive.combine manim-tinytex) + manim-tinytex ]) ]; nativeCheckInputs = [ ffmpeg - (texlive.combine manim-tinytex) + manim-tinytex ] ++ (with python.pkgs; [ pytest-xdist pytestCheckHook diff --git a/pkgs/applications/video/manim/failing_tests.nix b/pkgs/applications/video/manim/failing_tests.nix index 70c3efbb610..1bffaf6e740 100644 --- a/pkgs/applications/video/manim/failing_tests.nix +++ b/pkgs/applications/video/manim/failing_tests.nix @@ -71,4 +71,7 @@ # mismatching expecation on the new commandline "test_manim_new_command" + # This tests checks if the manim executable is a python script. In our case it is not. + # It is a wrapper shell script instead. + "test_manim_checkhealth_subcommand" ] diff --git a/pkgs/applications/video/manim/pytest-report-header.patch b/pkgs/applications/video/manim/pytest-report-header.patch new file mode 100644 index 00000000000..7aa87d373e5 --- /dev/null +++ b/pkgs/applications/video/manim/pytest-report-header.patch @@ -0,0 +1,22 @@ +diff --git a/conftest.py b/conftest.py +index dacb730a..149c6702 100644 +--- a/conftest.py ++++ b/conftest.py +@@ -33,17 +33,3 @@ def temp_media_dir(tmpdir, monkeypatch, request): + with tempconfig({"media_dir": str(tmpdir)}): + assert config.media_dir == str(tmpdir) + yield tmpdir +- +- +-def pytest_report_header(config): +- ctx = moderngl.create_standalone_context() +- info = ctx.info +- ctx.release() +- return ( +- f"\nCairo Version: {cairo.cairo_version()}", +- "\nOpenGL information", +- "------------------", +- f"vendor: {info['GL_VENDOR'].strip()}", +- f"renderer: {info['GL_RENDERER'].strip()}", +- f"version: {info['GL_VERSION'].strip()}\n", +- ) |