nixpkgs/pkgs/development/python-modules/pybox2d/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

43 lines
923 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
swig,
}:
buildPythonPackage rec {
pname = "pybox2d";
version = "2.3.10";
format = "setuptools";
src = fetchFromGitHub {
owner = "pybox2d";
repo = "pybox2d";
tag = version;
hash = "sha256-yjLFvsg8GQLxjN1vtZM9zl+kAmD4+eS/vzRkpj0SCjY=";
};
nativeBuildInputs = [ swig ];
# We need to build the package explicitly a first time so that the library/Box2D/Box2D.py file
# gets generated.
# After that, the default behavior will succeed at installing the package.
preBuild = ''
python setup.py build
'';
pythonImportsCheck = [
"Box2D"
"Box2D._Box2D"
];
# Tests need to start GUI windows.
doCheck = false;
meta = {
description = "2D Game Physics for Python";
homepage = "https://github.com/pybox2d/pybox2d";
license = lib.licenses.zlib;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}