Files
nixpkgs/pkgs/development/python-modules/pymunk/default.nix
2025-06-30 00:19:30 +00:00

49 lines
976 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
python,
setuptools,
cffi,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "pymunk";
version = "7.0.1";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchPypi {
inherit pname version;
hash = "sha256-lqOOgSP02J+IILQ2QPH2I9aETx+X7qCcRmDwMXgKn/g=";
};
nativeBuildInputs = [ cffi ];
build-system = [ setuptools ];
dependencies = [ cffi ];
preBuild = ''
${python.pythonOnBuildForHost.interpreter} setup.py build_ext --inplace
'';
nativeCheckInputs = [ pytestCheckHook ];
enabledTestPaths = [ "pymunk/tests" ];
pythonImportsCheck = [ "pymunk" ];
meta = with lib; {
description = "2d physics library";
homepage = "https://www.pymunk.org";
changelog = "https://github.com/viblo/pymunk/releases/tag/${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ emilytrau ];
platforms = platforms.unix;
};
}