diff options
Diffstat (limited to 'pkgs/development/python-modules/pygame-sdl2/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pygame-sdl2/default.nix | 60 |
1 files changed, 39 insertions, 21 deletions
diff --git a/pkgs/development/python-modules/pygame-sdl2/default.nix b/pkgs/development/python-modules/pygame-sdl2/default.nix index 0201c9cb4a8a0..f788c969a8f4e 100644 --- a/pkgs/development/python-modules/pygame-sdl2/default.nix +++ b/pkgs/development/python-modules/pygame-sdl2/default.nix @@ -1,16 +1,32 @@ -{ lib, buildPythonPackage, fetchurl, isPy27, renpy -, cython_0, SDL2, SDL2_image, SDL2_ttf, SDL2_mixer, libjpeg, libpng }: - -buildPythonPackage rec { +{ + lib, + buildPythonPackage, + fetchurl, + isPy27, + renpy, + cython_0, + SDL2, + SDL2_image, + SDL2_ttf, + SDL2_mixer, + libjpeg, + libpng, + setuptools, +}: +let pname = "pygame-sdl2"; version = "2.1.0"; - format = "setuptools"; renpy_version = renpy.base_version; +in + +buildPythonPackage { + inherit pname version; name = "${pname}-${version}-${renpy_version}"; + pyproject = true; src = fetchurl { url = "https://www.renpy.org/dl/${renpy_version}/pygame_sdl2-${version}+renpy${renpy_version}.tar.gz"; - hash = "sha256-mrfrsRAVEqw7fwtYdeATp/8AtMn74x9pJEXwYZPOl2I="; + hash = "sha256-Zib39NyQ1pGVCWPrK5/Tl3dAylUlmKZKxU8pf+OpAdY="; }; # force rebuild of headers needed for install @@ -24,27 +40,29 @@ buildPythonPackage rec { ''; nativeBuildInputs = [ - SDL2.dev cython_0 + SDL2.dev + cython_0 + setuptools ]; buildInputs = [ - SDL2 SDL2_image SDL2_ttf SDL2_mixer - libjpeg libpng + SDL2 + SDL2_image + SDL2_ttf + SDL2_mixer + libjpeg + libpng ]; - doCheck = isPy27; # python3 tests are non-functional - postInstall = '' - ( cd "$out"/include/python*/ ; - ln -s pygame-sdl2 pygame_sdl2 || true ; ) - ''; - - meta = with lib; { - description = "A reimplementation of parts of pygame API using SDL2"; - homepage = "https://github.com/renpy/pygame_sdl2"; - # Some parts are also available under Zlib License - license = licenses.lgpl2; - maintainers = with maintainers; [ raskin ]; + meta = { + description = "Reimplementation of parts of pygame API using SDL2"; + homepage = "https://github.com/renpy/pygame_sdl2"; + license = with lib.licenses; [ + lgpl2 + zlib + ]; + maintainers = with lib.maintainers; [ raskin ]; }; } |