From d27954a5618649128e0f9060e5d3d0ad33d30d80 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 29 May 2023 13:18:07 +0200 Subject: [PATCH] manim: Pin networkx and watchdog Fixes the build. --- pkgs/applications/video/manim/default.nix | 41 +++++++++++++++---- .../video/manim/failing_tests.nix | 32 +++++++-------- 2 files changed, 47 insertions(+), 26 deletions(-) diff --git a/pkgs/applications/video/manim/default.nix b/pkgs/applications/video/manim/default.nix index bcb6eca1632..c4443af00db 100644 --- a/pkgs/applications/video/manim/default.nix +++ b/pkgs/applications/video/manim/default.nix @@ -1,5 +1,6 @@ { lib , fetchFromGitHub +, fetchPypi , cairo , ffmpeg @@ -42,7 +43,30 @@ let fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super babel-english gnu-freefont mathastext cbfonts-fd; }; -in python3.pkgs.buildPythonApplication rec { + + 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="; + }; + }); + }; + }; + +in python.pkgs.buildPythonApplication rec { pname = "manim"; format = "pyproject"; version = "0.16.0.post0"; @@ -55,8 +79,8 @@ in python3.pkgs.buildPythonApplication rec { sha256 = "sha256-iXiPnI6lTP51P1X3iLp75ArRP66o8WAANBLoStPrz4M="; }; - nativeBuildInputs = [ - python3.pkgs.poetry-core + nativeBuildInputs = with python.pkgs; [ + poetry-core ]; postPatch = '' @@ -69,7 +93,7 @@ in python3.pkgs.buildPythonApplication rec { buildInputs = [ cairo ]; - propagatedBuildInputs = with python3.pkgs; [ + propagatedBuildInputs = with python.pkgs; [ click click-default-group cloup @@ -106,14 +130,13 @@ in python3.pkgs.buildPythonApplication rec { ]) ]; - nativeCheckInputs = [ - python3.pkgs.pytest-xdist - python3.pkgs.pytestCheckHook - ffmpeg (texlive.combine manim-tinytex) - ]; + ] ++ (with python.pkgs; [ + pytest-xdist + pytestCheckHook + ]); # about 55 of ~600 tests failing mostly due to demand for display disabledTests = import ./failing_tests.nix; diff --git a/pkgs/applications/video/manim/failing_tests.nix b/pkgs/applications/video/manim/failing_tests.nix index 571ddebc74a..70c3efbb610 100644 --- a/pkgs/applications/video/manim/failing_tests.nix +++ b/pkgs/applications/video/manim/failing_tests.nix @@ -1,5 +1,5 @@ -# reason for failure: tests try to open display [ + # reason for failure: tests try to open display "test_background_color" "test_scene_add_remove" "test_Circle" @@ -46,31 +46,29 @@ "test_force_window_opengl_render_with_format" "test_get_frame_with_preview_disabled" "test_get_frame_with_preview_enabled" -] ++ -# reason for failure: tests try to reach network -[ + # reason for failure: tests try to reach network "test_logging_to_file" "test_plugin_function_like" "test_plugin_no_all" "test_plugin_with_all" -] ++ -# failing with: -# E AssertionError: -# E Not equal to tolerance rtol=1e-07, atol=1.01 -# E Frame no -1. You can use --show_diff to visually show the difference. -# E Mismatched elements: 18525 / 1639680 (1.13%) -# E Max absolute difference: 255 -# E Max relative difference: 255. -[ + # failing with: + # E AssertionError: + # E Not equal to tolerance rtol=1e-07, atol=1.01 + # E Frame no -1. You can use --show_diff to visually show the difference. + # E Mismatched elements: 18525 / 1639680 (1.13%) + # E Max absolute difference: 255 + # E Max relative difference: 255. "test_Text2Color" "test_PointCloudDot" "test_Torus" -] ++ -# failing with: -# TypeError: __init__() got an unexpected keyword argument 'msg' - maybe you meant pytest.mark.skipif? -[ + # failing with: + # TypeError: __init__() got an unexpected keyword argument 'msg' - maybe you meant pytest.mark.skipif? "test_force_window_opengl_render_with_movies" + + # mismatching expecation on the new commandline + "test_manim_new_command" + ]