evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / pybox2d / default.nix
blob0d7069c736ca8730e15133bf7701ba6e9ad169d5
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   swig,
6 }:
8 buildPythonPackage rec {
9   pname = "pybox2d";
10   version = "2.3.10";
11   format = "setuptools";
13   src = fetchFromGitHub {
14     owner = "pybox2d";
15     repo = "pybox2d";
16     rev = "refs/tags/${version}";
17     hash = "sha256-yjLFvsg8GQLxjN1vtZM9zl+kAmD4+eS/vzRkpj0SCjY=";
18   };
20   nativeBuildInputs = [ swig ];
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   '';
29   pythonImportsCheck = [
30     "Box2D"
31     "Box2D._Box2D"
32   ];
34   # Tests need to start GUI windows.
35   doCheck = false;
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   };