2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
python,
|
|
|
|
cffi,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
ApplicationServices,
|
2021-07-24 12:14:16 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pymunk";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "6.5.2";
|
2022-12-17 10:02:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
extension = "zip";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-AV6upaZcnbKmQm9tTItRB6LpckappjdHvMH/awn/KeE=";
|
2021-07-24 12:14:16 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ cffi ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices ];
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
2023-11-16 04:20:00 +00:00
|
|
|
${python.pythonOnBuildForHost.interpreter} setup.py build_ext --inplace
|
2021-07-24 12:14:16 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "pymunk/tests" ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pymunk" ];
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "2d physics library";
|
|
|
|
homepage = "https://www.pymunk.org";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/viblo/pymunk/releases/tag/${version}";
|
2021-07-24 12:14:16 +00:00
|
|
|
license = with licenses; [ mit ];
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with maintainers; [ emilytrau ];
|
2021-08-27 14:25:00 +00:00
|
|
|
platforms = platforms.unix;
|
2021-07-24 12:14:16 +00:00
|
|
|
};
|
|
|
|
}
|