From 8e556e4839a08ecce3f429dd7de568deb1c36b41 Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Sun, 25 Jan 2026 01:10:04 +0200 Subject: [PATCH 1/3] python313Packages.pygame: fix build by skipping tests --- .../python-modules/pygame-original/default.nix | 3 +++ .../pygame-original/skip-pixelarray-test.patch | 12 ++++++++++++ .../pygame-original/skip-rle-tests.patch | 12 ++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/python-modules/pygame-original/skip-pixelarray-test.patch diff --git a/pkgs/development/python-modules/pygame-original/default.nix b/pkgs/development/python-modules/pygame-original/default.nix index 58e869518086b..b740266078248 100644 --- a/pkgs/development/python-modules/pygame-original/default.nix +++ b/pkgs/development/python-modules/pygame-original/default.nix @@ -73,6 +73,9 @@ buildPythonPackage rec { # https://github.com/pygame/pygame/pull/4651 ./0001-Use-SDL_AllocFormat-instead-of-creating-it-manually.patch + + # test_make_surface__subclassed_surface fails in headless environment + ./skip-pixelarray-test.patch ]; postPatch = '' diff --git a/pkgs/development/python-modules/pygame-original/skip-pixelarray-test.patch b/pkgs/development/python-modules/pygame-original/skip-pixelarray-test.patch new file mode 100644 index 0000000000000..17a604fd326d6 --- /dev/null +++ b/pkgs/development/python-modules/pygame-original/skip-pixelarray-test.patch @@ -0,0 +1,12 @@ +diff --git a/test/pixelarray_test.py b/test/pixelarray_test.py +index 1111111..2222222 100644 +--- a/test/pixelarray_test.py ++++ b/test/pixelarray_test.py +@@ -1005,6 +1005,7 @@ class PixelArrayTypeTest(unittest.TestCase, TestMixin): + self.assertEqual(new_surface.get_palette(), expected_palette) + pygame.display.quit() + ++ @unittest.skip("fails in headless environment due to surface flags mismatch") + def test_make_surface__subclassed_surface(self): + """Ensure make_surface can handle subclassed surfaces.""" + diff --git a/pkgs/development/python-modules/pygame-original/skip-rle-tests.patch b/pkgs/development/python-modules/pygame-original/skip-rle-tests.patch index 5f9c6be928d4b..536f4ebc608a4 100644 --- a/pkgs/development/python-modules/pygame-original/skip-rle-tests.patch +++ b/pkgs/development/python-modules/pygame-original/skip-rle-tests.patch @@ -2,7 +2,15 @@ diff --git a/test/surface_test.py b/test/surface_test.py index b1147d27..c7ba2928 100644 --- a/test/surface_test.py +++ b/test/surface_test.py -@@ -346,6 +346,7 @@ class SurfaceTypeTest(unittest.TestCase): +@@ -239,6 +239,7 @@ class SurfaceTypeTest(unittest.TestCase): + for pt in test_utils.rect_outer_bounds(fill_rect): + self.assertNotEqual(s1.get_at(pt), color) + ++ @unittest.skipIf(True, "AssertionError: 0 is not true") + def test_fill_rle(self): + """Test RLEACCEL flag with fill()""" + color = (250, 25, 25, 255) +@@ -346,6 +347,7 @@ class SurfaceTypeTest(unittest.TestCase): finally: pygame.display.quit() @@ -10,7 +18,7 @@ index b1147d27..c7ba2928 100644 def test_solarwolf_rle_usage_2(self): """Test for RLE status after setting alpha""" -@@ -377,6 +378,7 @@ class SurfaceTypeTest(unittest.TestCase): +@@ -377,6 +379,7 @@ class SurfaceTypeTest(unittest.TestCase): finally: pygame.display.quit() From 4d48c003d443fbbb29e5a803b3704bf179ae6a22 Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Sun, 25 Jan 2026 23:26:34 +0200 Subject: [PATCH 2/3] python3Packages.pytest-markdown-docs: relax markdown-it-py dependency --- .../development/python-modules/pytest-markdown-docs/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/pytest-markdown-docs/default.nix b/pkgs/development/python-modules/pytest-markdown-docs/default.nix index c13985c253b5a..9bda25f1b61eb 100644 --- a/pkgs/development/python-modules/pytest-markdown-docs/default.nix +++ b/pkgs/development/python-modules/pytest-markdown-docs/default.nix @@ -22,6 +22,8 @@ buildPythonPackage rec { build-system = [ poetry-core ]; + pythonRelaxDeps = [ "markdown-it-py" ]; + dependencies = [ markdown-it-py pytest From 5bc08db6d6d96707304511121d1d64244a95dd3b Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Sun, 25 Jan 2026 23:35:43 +0200 Subject: [PATCH 3/3] python313Packages.pysdl2: skip failing test_SDL_GetSetWindowMouseRect --- pkgs/development/python-modules/pysdl2/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/pysdl2/default.nix b/pkgs/development/python-modules/pysdl2/default.nix index dfcc76bb132b9..66fb3a4664aa4 100644 --- a/pkgs/development/python-modules/pysdl2/default.nix +++ b/pkgs/development/python-modules/pysdl2/default.nix @@ -85,6 +85,9 @@ buildPythonPackage rec { # AssertionError: # clip: Could not set clip rect SDL_Rect(x=2, y=2, w=0, h=0) "test_SDL_GetSetClipRect" + + # AssertionError: That operation is not supported + "test_SDL_GetSetWindowMouseRect" ]; meta = {