mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 01:26:32 +01:00
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>
43 lines
923 B
Nix
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 ];
|
|
};
|
|
}
|