depot/third_party/nixpkgs/pkgs/development/python-modules/pymunk/default.nix
Default email 792b51d22f Project import generated by Copybara.
GitOrigin-RevId: d5f237872975e6fb6f76eef1368b5634ffcd266f
2022-02-20 05:27:41 +00:00

43 lines
876 B
Nix

{ stdenv
, lib
, buildPythonPackage
, fetchPypi
, python
, cffi
, pytestCheckHook
, ApplicationServices
}:
buildPythonPackage rec {
pname = "pymunk";
version = "6.2.1";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "18ae0f83ec2dc20892b98c84127ce9149ab40fa3c3120097377e1506884b27b8";
};
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;
};
}