2021-08-11 14:56:57 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-07-24 12:14:16 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
|
|
|
, cffi
|
|
|
|
, pytestCheckHook
|
2021-08-11 14:56:57 +00:00
|
|
|
, ApplicationServices
|
2021-07-24 12:14:16 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pymunk";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "6.3.0";
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
extension = "zip";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-er0+HuCQw2FPeyuBc1BVdutmidYzcKIBqdeteqwsXiA=";
|
2021-07-24 12:14:16 +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
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"pymunk/tests"
|
|
|
|
];
|
2021-08-11 14:56:57 +00:00
|
|
|
pythonImportsCheck = [ "pymunk" ];
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "2d physics library";
|
|
|
|
homepage = "https://www.pymunk.org";
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|