diff --git a/pkgs/development/python-modules/box2d/disable-test.patch b/pkgs/development/python-modules/box2d/disable-test.patch new file mode 100644 index 00000000000..bc2897a8b10 --- /dev/null +++ b/pkgs/development/python-modules/box2d/disable-test.patch @@ -0,0 +1,14 @@ +Common subdirectories: Box2D-2.3b0/Box2D and Box2D-2.3b0.new/Box2D +Common subdirectories: Box2D-2.3b0/examples and Box2D-2.3b0.new/examples +Common subdirectories: Box2D-2.3b0/library and Box2D-2.3b0.new/library +diff -u Box2D-2.3b0/setup.py Box2D-2.3b0.new/setup.py +--- Box2D-2.3b0/setup.py 2013-02-02 18:09:34.000000000 +0100 ++++ Box2D-2.3b0.new/setup.py 2014-10-25 13:32:07.136922343 +0200 +@@ -176,7 +176,6 @@ + package_dir = {'Box2D': library_path, + 'Box2D.b2': os.path.join(library_path, 'b2'), + 'Box2D.tests' : 'tests'}, +- test_suite = 'tests', + options = { 'build_ext': { 'swig_opts' : swig_arguments }, + 'egg_info' : { 'egg_base' : library_base }, + }, diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 809e648e910..000ff72bd48 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1056,6 +1056,31 @@ let }; }; + box2d = buildPythonPackage rec { + name = "box2d-${version}"; + version = "2.3b0"; + disabled = (!isPy27); + + src = pkgs.fetchurl { + url = "https://pypi.python.org/packages/source/B/Box2D/Box2D-2.3b0.zip"; + md5="25fc4f69cd580bdca0022ac3ace53865"; + }; + + patches = [ ../development/python-modules/box2d/disable-test.patch ]; + + propagatedBuildInputs = [ pkgs.swig pkgs.box2d ]; + + meta = with stdenv.lib; { + homepage = https://code.google.com/p/pybox2d/; + description = '' + A 2D game physics library for Python under + the very liberal zlib license + ''; + license = licenses.zlib; + platforms = platforms.all; + maintainers = [ maintainers.sepi ]; + }; + }; # bugz = buildPythonPackage (rec { # name = "bugz-0.9.3";