at master 925 B view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 swig, 6}: 7 8buildPythonPackage rec { 9 pname = "pybox2d"; 10 version = "2.3.10"; 11 format = "setuptools"; 12 13 src = fetchFromGitHub { 14 owner = "pybox2d"; 15 repo = "pybox2d"; 16 tag = version; 17 hash = "sha256-yjLFvsg8GQLxjN1vtZM9zl+kAmD4+eS/vzRkpj0SCjY="; 18 }; 19 20 nativeBuildInputs = [ swig ]; 21 22 # We need to build the package explicitly a first time so that the library/Box2D/Box2D.py file 23 # gets generated. 24 # After that, the default behavior will succeed at installing the package. 25 preBuild = '' 26 python setup.py build 27 ''; 28 29 pythonImportsCheck = [ 30 "Box2D" 31 "Box2D._Box2D" 32 ]; 33 34 # Tests need to start GUI windows. 35 doCheck = false; 36 37 meta = with lib; { 38 description = "2D Game Physics for Python"; 39 homepage = "https://github.com/pybox2d/pybox2d"; 40 license = licenses.zlib; 41 maintainers = with maintainers; [ GaetanLepage ]; 42 }; 43}