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";
|
2021-12-26 17:43:05 +00:00
|
|
|
version = "6.2.1";
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
extension = "zip";
|
2021-12-26 17:43:05 +00:00
|
|
|
sha256 = "18ae0f83ec2dc20892b98c84127ce9149ab40fa3c3120097377e1506884b27b8";
|
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
|
|
|
};
|
|
|
|
}
|