1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, swig2
5, pkgs-box2d
6, isPy3k
7}:
8
9buildPythonPackage rec {
10 pname = "Box2D";
11 version = "2.3.2";
12 disabled = isPy3k;
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "d1557dffdf9c1d6c796ec5df53e3d93227bb026c14b8411d22c295edaa2fb225";
17 };
18
19 postPatch = ''
20 sed -i "s/'Box2D.tests' : 'tests'//" setup.py
21 '';
22
23 buildInputs = [ swig2 pkgs-box2d ];
24
25 # tests not included with pypi release
26 doCheck = false;
27
28 meta = with stdenv.lib; {
29 homepage = https://github.com/pybox2d/pybox2d;
30 description = ''
31 A 2D game physics library for Python under
32 the very liberal zlib license
33 '';
34 license = licenses.zlib;
35 maintainers = with maintainers; [ sepi ];
36 };
37}