summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMartin Weinelt <mweinelt@users.noreply.github.com>2023-05-29 22:09:48 +0200
committerGitHub <noreply@github.com>2023-05-29 22:09:48 +0200
commitbee04d0747f76a3fef514a4d719b273f89f6c677 (patch)
tree15896f7ad7005dad9625a0ca15c278617ac1efc7 /pkgs
parent73eca51a5915c8e98d5b22128355b363b8c19db5 (diff)
parent5238dd139835fa282ee2697100ca313df83853bc (diff)
Merge pull request #234848 from NixOS/backport-234777-to-release-23.05
[Backport release-23.05] manim: Pin networkx and watchdog
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/video/manim/default.nix41
-rw-r--r--pkgs/applications/video/manim/failing_tests.nix32
2 files changed, 47 insertions, 26 deletions
diff --git a/pkgs/applications/video/manim/default.nix b/pkgs/applications/video/manim/default.nix
index bcb6eca16321a..c4443af00dbe7 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 571ddebc74a1f..70c3efbb610c6 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"
+
 ]