From e98c99a4f505845ec766c6cd2983f3e884efa9b9 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sun, 20 Apr 2025 15:30:32 +0200 Subject: [PATCH] pygame-ce: unbreak --- .../python-modules/pygame-ce/default.nix | 8 +++--- .../pygame-ce/skip-surface-tests.patch | 26 ------------------- 2 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 pkgs/development/python-modules/pygame-ce/skip-surface-tests.patch diff --git a/pkgs/development/python-modules/pygame-ce/default.nix b/pkgs/development/python-modules/pygame-ce/default.nix index 649c72c0be2a..fb3b91d55d42 100644 --- a/pkgs/development/python-modules/pygame-ce/default.nix +++ b/pkgs/development/python-modules/pygame-ce/default.nix @@ -19,7 +19,7 @@ libpng, libX11, portmidi, - SDL2, + SDL2_classic, SDL2_image, SDL2_mixer, SDL2_ttf, @@ -60,8 +60,6 @@ buildPythonPackage rec { ]) buildInputs ); }) - # Skip tests that should be disabled without video driver - ./skip-surface-tests.patch ]; postPatch = @@ -101,7 +99,7 @@ buildPythonPackage rec { libjpeg libpng portmidi - SDL2 + SDL2_classic SDL2_image SDL2_mixer SDL2_ttf @@ -117,7 +115,7 @@ buildPythonPackage rec { env = { - SDL_CONFIG = lib.getExe' (lib.getDev SDL2) "sdl2-config"; + SDL_CONFIG = lib.getExe' (lib.getDev SDL2_classic) "sdl2-config"; } // lib.optionalAttrs stdenv.cc.isClang { NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-function-pointer-types"; diff --git a/pkgs/development/python-modules/pygame-ce/skip-surface-tests.patch b/pkgs/development/python-modules/pygame-ce/skip-surface-tests.patch deleted file mode 100644 index 21d9c9060f3b..000000000000 --- a/pkgs/development/python-modules/pygame-ce/skip-surface-tests.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/test/surface_test.py b/test/surface_test.py -index 5ce78b6e..8b8f7ed5 100644 ---- a/test/surface_test.py -+++ b/test/surface_test.py -@@ -1091,6 +1091,10 @@ class GeneralSurfaceTests(unittest.TestCase): - finally: - pygame.display.quit() - -+ @unittest.skipIf( -+ os.environ.get("SDL_VIDEODRIVER") == "dummy", -+ 'requires a non-"dummy" SDL_VIDEODRIVER', -+ ) - def test_convert_init(self): - """Ensure initialization exceptions are raised - for surf.convert().""" -@@ -1118,6 +1122,10 @@ class GeneralSurfaceTests(unittest.TestCase): - finally: - pygame.display.quit() - -+ @unittest.skipIf( -+ os.environ.get("SDL_VIDEODRIVER") == "dummy", -+ 'requires a non-"dummy" SDL_VIDEODRIVER', -+ ) - def test_convert_alpha_init(self): - """Ensure initialization exceptions are raised - for surf.convert_alpha()."""