diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index 2e7efbd71690..fb6d78e1046c 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -29,6 +29,8 @@ - `iroh` has been removed and split up into `iroh-dns-server` and `iroh-relay`. +- `python3Packages.pygame` has been been renamed to `python3Packages.pygame-original`, the attribute `python3Packages.pygame` will from python 3.14 default to the more actively maintained `python3Packages.pygame-ce` + - `python3Packages.gradio` has been updated to version 6. See upstream's migration guide at https://www.gradio.app/main/guides/gradio-6-migration-guide. - `vicinae` has been updated to v0.17. Version 0.17 contains a complete overhaul of the configuration system. For update instructions, see the [release notes for v0.17.0](https://github.com/vicinaehq/vicinae/releases/tag/v0.17.0) and the [upstream configuration documentation](https://docs.vicinae.com/config). diff --git a/pkgs/by-name/br/brutalmaze/package.nix b/pkgs/by-name/br/brutalmaze/package.nix index fd7341aae392..1266b4cce2a5 100644 --- a/pkgs/by-name/br/brutalmaze/package.nix +++ b/pkgs/by-name/br/brutalmaze/package.nix @@ -1,14 +1,14 @@ { lib, fetchFromSourcehut, - python3Packages, + python312Packages, }: -python3Packages.buildPythonApplication rec { +python312Packages.buildPythonApplication rec { pname = "brutalmaze"; version = "1.1.1"; format = "pyproject"; - disabled = python3Packages.pythonOlder "3.7"; + disabled = python312Packages.pythonOlder "3.7"; src = fetchFromSourcehut { owner = "~cnx"; @@ -17,14 +17,19 @@ python3Packages.buildPythonApplication rec { sha256 = "1m105iq378mypj64syw59aldbm6bj4ma4ynhc50gafl656fabg4y"; }; - nativeBuildInputs = with python3Packages; [ + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "pygame" "pygame-ce" + ''; + + nativeBuildInputs = with python312Packages; [ flit-core ]; - propagatedBuildInputs = with python3Packages; [ + propagatedBuildInputs = with python312Packages; [ loca palace - pygame + pygame-ce ]; doCheck = false; # there's no test diff --git a/pkgs/by-name/en/endgame-singularity/package.nix b/pkgs/by-name/en/endgame-singularity/package.nix index 21fd5c4faff5..daa9143f5051 100644 --- a/pkgs/by-name/en/endgame-singularity/package.nix +++ b/pkgs/by-name/en/endgame-singularity/package.nix @@ -31,6 +31,11 @@ python3.pkgs.buildPythonApplication { srcs = [ main_src ] ++ lib.optional enableDefaultMusicPack music_src; sourceRoot = main_src.name; + postPatch = '' + substituteInPlace setup.py \ + --replace-fail "pygame>=2.5.2" "pygame-ce" + ''; + nativeBuildInputs = [ unzip ]; # The music is zipped build-system = with python3.pkgs; [ @@ -38,7 +43,7 @@ python3.pkgs.buildPythonApplication { ]; dependencies = with python3.pkgs; [ - pygame + pygame-ce numpy polib ]; diff --git a/pkgs/development/python-modules/pygame/0001-Use-SDL_AllocFormat-instead-of-creating-it-manually.patch b/pkgs/development/python-modules/pygame-original/0001-Use-SDL_AllocFormat-instead-of-creating-it-manually.patch similarity index 100% rename from pkgs/development/python-modules/pygame/0001-Use-SDL_AllocFormat-instead-of-creating-it-manually.patch rename to pkgs/development/python-modules/pygame-original/0001-Use-SDL_AllocFormat-instead-of-creating-it-manually.patch diff --git a/pkgs/development/python-modules/pygame/0001-Use-SDL_HasSurfaceRLE-when-available.patch b/pkgs/development/python-modules/pygame-original/0001-Use-SDL_HasSurfaceRLE-when-available.patch similarity index 100% rename from pkgs/development/python-modules/pygame/0001-Use-SDL_HasSurfaceRLE-when-available.patch rename to pkgs/development/python-modules/pygame-original/0001-Use-SDL_HasSurfaceRLE-when-available.patch diff --git a/pkgs/development/python-modules/pygame/0002-Don-t-assume-that-touch-devices-support-get_num_fing.patch b/pkgs/development/python-modules/pygame-original/0002-Don-t-assume-that-touch-devices-support-get_num_fing.patch similarity index 100% rename from pkgs/development/python-modules/pygame/0002-Don-t-assume-that-touch-devices-support-get_num_fing.patch rename to pkgs/development/python-modules/pygame-original/0002-Don-t-assume-that-touch-devices-support-get_num_fing.patch diff --git a/pkgs/development/python-modules/pygame/default.nix b/pkgs/development/python-modules/pygame-original/default.nix similarity index 94% rename from pkgs/development/python-modules/pygame/default.nix rename to pkgs/development/python-modules/pygame-original/default.nix index d4a4c92f89c8..58e869518086 100644 --- a/pkgs/development/python-modules/pygame/default.nix +++ b/pkgs/development/python-modules/pygame-original/default.nix @@ -6,6 +6,7 @@ replaceVars, fontconfig, python, + pythonAtLeast, # build-system cython, @@ -128,11 +129,13 @@ buildPythonPackage rec { pythonImportsCheck = [ "pygame" ]; meta = { - description = "Python library for games"; + description = "Python library for games (original distribution)"; homepage = "https://www.pygame.org/"; changelog = "https://github.com/pygame/pygame/releases/tag/${src.tag}"; license = lib.licenses.lgpl21Plus; maintainers = with lib.maintainers; [ emilytrau ]; platforms = lib.platforms.unix; + # https://github.com/pygame/pygame/issues/4706 + broken = pythonAtLeast "3.14"; }; } diff --git a/pkgs/development/python-modules/pygame/fix-dependency-finding.patch b/pkgs/development/python-modules/pygame-original/fix-dependency-finding.patch similarity index 100% rename from pkgs/development/python-modules/pygame/fix-dependency-finding.patch rename to pkgs/development/python-modules/pygame-original/fix-dependency-finding.patch diff --git a/pkgs/development/python-modules/pygame/skip-mixer-test.patch b/pkgs/development/python-modules/pygame-original/skip-mixer-test.patch similarity index 100% rename from pkgs/development/python-modules/pygame/skip-mixer-test.patch rename to pkgs/development/python-modules/pygame-original/skip-mixer-test.patch diff --git a/pkgs/development/python-modules/pygame/skip-rle-tests.patch b/pkgs/development/python-modules/pygame-original/skip-rle-tests.patch similarity index 100% rename from pkgs/development/python-modules/pygame/skip-rle-tests.patch rename to pkgs/development/python-modules/pygame-original/skip-rle-tests.patch diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fcb0a5310058..b9f0fc43bfae 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13443,12 +13443,15 @@ self: super: with self; { pygal = callPackage ../development/python-modules/pygal { }; - pygame = callPackage ../development/python-modules/pygame { }; + # pygame-ce is better maintained upstream, the breaking point was https://github.com/NixOS/nixpkgs/pull/475917#issuecomment-3706940043 + pygame = if pythonAtLeast "3.14" then pygame-ce else pygame-original; pygame-ce = callPackage ../development/python-modules/pygame-ce { }; pygame-gui = callPackage ../development/python-modules/pygame-gui { }; + pygame-original = callPackage ../development/python-modules/pygame-original { }; + pygame-sdl2 = callPackage ../development/python-modules/pygame-sdl2 { }; pygatt = callPackage ../development/python-modules/pygatt { };