evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / pygame-sdl2 / default.nix
blob43ce26585f30ed2a7e8b66d44c4b9fdc4d6f2f31
2   lib,
3   buildPythonPackage,
4   fetchurl,
5   isPy27,
6   renpy,
7   cython_0,
8   SDL2,
9   SDL2_image,
10   SDL2_ttf,
11   SDL2_mixer,
12   libjpeg,
13   libpng,
14   setuptools,
16 let
17   pname = "pygame-sdl2";
18   version = "2.1.0";
19   renpy_version = renpy.base_version;
22 buildPythonPackage {
23   inherit pname version;
24   name = "${pname}-${version}-${renpy_version}";
25   pyproject = true;
27   src = fetchurl {
28     url = "https://www.renpy.org/dl/${renpy_version}/pygame_sdl2-${version}+renpy${renpy_version}.tar.gz";
29     hash = "sha256-bcTrdXWLTCnZQ/fP5crKIPoqJiyz+o6s0PzRChV7TQE=";
30   };
32   # force rebuild of headers needed for install
33   prePatch = ''
34     rm -rf gen gen3
35   '';
37   # Remove build tag which produces invaild version
38   postPatch = ''
39     sed -i '2d' setup.cfg
40   '';
42   nativeBuildInputs = [
43     SDL2.dev
44     cython_0
45     setuptools
46   ];
48   buildInputs = [
49     SDL2
50     SDL2_image
51     SDL2_ttf
52     SDL2_mixer
53     libjpeg
54     libpng
55   ];
57   doCheck = isPy27; # python3 tests are non-functional
59   meta = {
60     description = "Reimplementation of parts of pygame API using SDL2";
61     homepage = "https://github.com/renpy/pygame_sdl2";
62     license = with lib.licenses; [
63       lgpl2
64       zlib
65     ];
66     maintainers = with lib.maintainers; [ raskin ];
67   };