nixpkgs/pkgs/development/python-modules/pymunk/default.nix

44 lines
864 B
Nix
Raw Normal View History

{ stdenv
, lib
2021-07-16 02:19:41 +02:00
, buildPythonPackage
, fetchPypi
, python
, cffi
, pytestCheckHook
, ApplicationServices
2021-07-16 02:19:41 +02:00
}:
buildPythonPackage rec {
pname = "pymunk";
2021-08-26 03:19:54 +02:00
version = "6.2.0";
2021-07-16 02:19:41 +02:00
src = fetchPypi {
inherit pname version;
extension = "zip";
2021-08-26 03:19:54 +02:00
sha256 = "1r3jfjg4cpdilrmlyml514hqmjgabyrrs4cvmdr56rylg1sp4gf3";
2021-07-16 02:19:41 +02:00
};
propagatedBuildInputs = [ cffi ];
buildInputs = lib.optionals stdenv.isDarwin [
ApplicationServices
];
2021-07-16 02:19:41 +02:00
preBuild = ''
${python.interpreter} setup.py build_ext --inplace
'';
checkInputs = [ pytestCheckHook ];
pytestFlagsArray = [
"pymunk/tests"
];
pythonImportsCheck = [ "pymunk" ];
2021-07-16 02:19:41 +02:00
meta = with lib; {
description = "2d physics library";
homepage = "https://www.pymunk.org";
license = with licenses; [ mit ];
maintainers = with maintainers; [ angustrau ];
2021-08-26 03:19:54 +02:00
platforms = platforms.unix;
2021-07-16 02:19:41 +02:00
};
}