From 1e1367c2822e7554c5f123fe7254bbd3faa2c560 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sun, 25 Jan 2026 11:19:41 +0100 Subject: [PATCH 1/3] python3Packages.pygame-ce: skip failing tests --- .../python-modules/pygame-ce/default.nix | 4 +- .../pygame-ce/skip-failing-tests.patch | 43 +++++++++++++++++++ .../pygame-ce/skip-rle-tests.patch | 12 ------ 3 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 pkgs/development/python-modules/pygame-ce/skip-failing-tests.patch delete mode 100644 pkgs/development/python-modules/pygame-ce/skip-rle-tests.patch diff --git a/pkgs/development/python-modules/pygame-ce/default.nix b/pkgs/development/python-modules/pygame-ce/default.nix index c41cbf96780f..6b02afb75f38 100644 --- a/pkgs/development/python-modules/pygame-ce/default.nix +++ b/pkgs/development/python-modules/pygame-ce/default.nix @@ -60,8 +60,8 @@ buildPythonPackage rec { ); }) - # Can be removed after the SDL 3.4.0 bump. - ./skip-rle-tests.patch + # https://github.com/pygame-community/pygame-ce/pull/3680#issuecomment-3796052119 + ./skip-failing-tests.patch ]; postPatch = '' diff --git a/pkgs/development/python-modules/pygame-ce/skip-failing-tests.patch b/pkgs/development/python-modules/pygame-ce/skip-failing-tests.patch new file mode 100644 index 000000000000..d85b591ab13a --- /dev/null +++ b/pkgs/development/python-modules/pygame-ce/skip-failing-tests.patch @@ -0,0 +1,43 @@ +diff --git a/test/draw_test.py b/test/draw_test.py +index ed99f0ce9..0484ef53d 100644 +--- a/test/draw_test.py ++++ b/test/draw_test.py +@@ -7496,6 +7496,10 @@ class DrawModuleTest(unittest.TestCase): + with self.assertRaises(TypeError): + draw.polygon(surf, col, points, 0) + ++ @unittest.skipIf( ++ True, ++ "https://github.com/pygame-community/pygame-ce/pull/3680#issuecomment-3796052119", ++ ) + def test_aafunctions_depth_segfault(self): + """Ensure future commits don't break the segfault fixed by pull request + https://github.com/pygame-community/pygame-ce/pull/3008 +diff --git a/test/surface_test.py b/test/surface_test.py +index c2c91f4f5..35b9e1aaf 100644 +--- a/test/surface_test.py ++++ b/test/surface_test.py +@@ -286,6 +286,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, "https://github.com/libsdl-org/sdl2-compat/issues/575") + def test_fill_rle(self): + """Test RLEACCEL flag with fill()""" + color = (250, 25, 25, 255) +diff --git a/test/window_test.py b/test/window_test.py +index b8dd1f005..5b7939908 100644 +--- a/test/window_test.py ++++ b/test/window_test.py +@@ -113,10 +113,7 @@ class WindowTypeTest(unittest.TestCase): + self.win.always_on_top = False + self.assertFalse(self.win.always_on_top) + +- @unittest.skipIf( +- SDL < (2, 0, 18), +- "requires SDL 2.0.18+", +- ) ++ @unittest.skipIf(True, "https://github.com/pygame-community/pygame-ce/pull/3680") + def test_mouse_rect(self): + self.win.mouse_rect = None + self.assertIsNone(self.win.mouse_rect) diff --git a/pkgs/development/python-modules/pygame-ce/skip-rle-tests.patch b/pkgs/development/python-modules/pygame-ce/skip-rle-tests.patch deleted file mode 100644 index 6b488f0c880a..000000000000 --- a/pkgs/development/python-modules/pygame-ce/skip-rle-tests.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/test/surface_test.py b/test/surface_test.py -index c2c91f4f5..58d916de8 100644 ---- a/test/surface_test.py -+++ b/test/surface_test.py -@@ -435,6 +436,7 @@ class SurfaceTypeTest(unittest.TestCase): - finally: - pygame.display.quit() - -+ @unittest.skipIf(True, "https://github.com/libsdl-org/SDL/issues/14424") - def test_set_alpha__set_colorkey_rle(self): - pygame.display.init() - try: From 79c4ac482101dedc071a6bc153eadcd0ab0482e0 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sun, 25 Jan 2026 11:19:41 +0100 Subject: [PATCH 2/3] python3Packages.pygame-original: skip failing tests --- .../pygame-original/default.nix | 3 +-- .../pygame-original/skip-failing-tests.patch | 24 +++++++++++++++++++ .../pygame-original/skip-rle-tests.patch | 20 ---------------- 3 files changed, 25 insertions(+), 22 deletions(-) create mode 100644 pkgs/development/python-modules/pygame-original/skip-failing-tests.patch delete mode 100644 pkgs/development/python-modules/pygame-original/skip-rle-tests.patch diff --git a/pkgs/development/python-modules/pygame-original/default.nix b/pkgs/development/python-modules/pygame-original/default.nix index 58e869518086..bce0db96b739 100644 --- a/pkgs/development/python-modules/pygame-original/default.nix +++ b/pkgs/development/python-modules/pygame-original/default.nix @@ -64,8 +64,7 @@ buildPythonPackage rec { # mixer queue test returns busy queue when it shouldn't ./skip-mixer-test.patch - # Can be removed with the next SDL3 bump. - ./skip-rle-tests.patch + ./skip-failing-tests.patch # https://github.com/pygame/pygame/pull/4497 ./0001-Use-SDL_HasSurfaceRLE-when-available.patch diff --git a/pkgs/development/python-modules/pygame-original/skip-failing-tests.patch b/pkgs/development/python-modules/pygame-original/skip-failing-tests.patch new file mode 100644 index 000000000000..0d1e42257ec9 --- /dev/null +++ b/pkgs/development/python-modules/pygame-original/skip-failing-tests.patch @@ -0,0 +1,24 @@ +diff --git a/test/pixelarray_test.py b/test/pixelarray_test.py +index 7b1cf420..67b93d3d 100644 +--- a/test/pixelarray_test.py ++++ b/test/pixelarray_test.py +@@ -990,6 +990,7 @@ class PixelArrayTypeTest(unittest.TestCase, TestMixin): + self.assertEqual(w2, w) + self.assertEqual(h2, h_slice) + ++ @unittest.skipIf(True, "") + def test_make_surface__subclassed_surface(self): + """Ensure make_surface can handle subclassed surfaces.""" + expected_size = (3, 5) +diff --git a/test/surface_test.py b/test/surface_test.py +index b1147d27..8e1209ff 100644 +--- a/test/surface_test.py ++++ b/test/surface_test.py +@@ -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, "https://github.com/libsdl-org/sdl2-compat/issues/575") + def test_fill_rle(self): + """Test RLEACCEL flag with fill()""" + color = (250, 25, 25, 255) diff --git a/pkgs/development/python-modules/pygame-original/skip-rle-tests.patch b/pkgs/development/python-modules/pygame-original/skip-rle-tests.patch deleted file mode 100644 index 5f9c6be928d4..000000000000 --- a/pkgs/development/python-modules/pygame-original/skip-rle-tests.patch +++ /dev/null @@ -1,20 +0,0 @@ -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): - finally: - pygame.display.quit() - -+ @unittest.skipIf(True, "https://github.com/libsdl-org/SDL/pull/14429") - def test_solarwolf_rle_usage_2(self): - """Test for RLE status after setting alpha""" - -@@ -377,6 +378,7 @@ class SurfaceTypeTest(unittest.TestCase): - finally: - pygame.display.quit() - -+ @unittest.skipIf(True, "https://github.com/libsdl-org/SDL/issues/14424") - def test_set_alpha__set_colorkey_rle(self): - pygame.display.init() - try: From bce1254b01c7522f5f0ad4a182639595a48f34fd Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sun, 25 Jan 2026 11:19:41 +0100 Subject: [PATCH 3/3] python3Packages.pygame-original: disable on Python >= 3.14 Signed-off-by: Marcin Serwin --- pkgs/development/python-modules/pygame-original/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/pygame-original/default.nix b/pkgs/development/python-modules/pygame-original/default.nix index bce0db96b739..8cff86b55344 100644 --- a/pkgs/development/python-modules/pygame-original/default.nix +++ b/pkgs/development/python-modules/pygame-original/default.nix @@ -32,6 +32,9 @@ buildPythonPackage rec { version = "2.6.1"; pyproject = true; + # https://github.com/NixOS/nixpkgs/pull/475917 + disabled = pythonAtLeast "3.14"; + src = fetchFromGitHub { owner = "pygame"; repo = "pygame";