2021-08-11 14:56:57 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-07-24 12:14:16 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
|
|
|
, cffi
|
|
|
|
, pytestCheckHook
|
2022-12-17 10:02:37 +00:00
|
|
|
, pythonOlder
|
2021-08-11 14:56:57 +00:00
|
|
|
, ApplicationServices
|
2021-07-24 12:14:16 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pymunk";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "6.4.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
extension = "zip";
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-YNzZ/wQz5s5J5ctXekNo0FksRoX03rZE1wXIghYcck4=";
|
2021-07-24 12:14:16 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cffi
|
|
|
|
];
|
|
|
|
|
2021-08-11 14:56:57 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
ApplicationServices
|
|
|
|
];
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
${python.interpreter} setup.py build_ext --inplace
|
|
|
|
'';
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"pymunk/tests"
|
|
|
|
];
|
2022-12-17 10:02:37 +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
|
|
|
};
|
|
|
|
}
|