python3Packages.pygame: rename to pygame-original, point to pygame-ce for Python >= 3.14 (#475917)
This commit is contained in:
@@ -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).
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
];
|
||||
|
||||
+4
-1
@@ -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";
|
||||
};
|
||||
}
|
||||
@@ -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 { };
|
||||
|
||||
Reference in New Issue
Block a user