01ed8ef136
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
43 lines
863 B
Nix
43 lines
863 B
Nix
{ stdenv
|
|
, lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, python
|
|
, cffi
|
|
, pytestCheckHook
|
|
, ApplicationServices
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pymunk";
|
|
version = "6.3.0";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
extension = "zip";
|
|
sha256 = "sha256-er0+HuCQw2FPeyuBc1BVdutmidYzcKIBqdeteqwsXiA=";
|
|
};
|
|
|
|
propagatedBuildInputs = [ cffi ];
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
ApplicationServices
|
|
];
|
|
|
|
preBuild = ''
|
|
${python.interpreter} setup.py build_ext --inplace
|
|
'';
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
pytestFlagsArray = [
|
|
"pymunk/tests"
|
|
];
|
|
pythonImportsCheck = [ "pymunk" ];
|
|
|
|
meta = with lib; {
|
|
description = "2d physics library";
|
|
homepage = "https://www.pymunk.org";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ emilytrau ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|