mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-12 07:54:50 +00:00
2bfa93e01c
It won't be enough to fix cross in all cases, but it is in at least one: pywayland. I've only made the change in cases I'm confident it's correct, as it would be wrong to change this when python.interpreter is used in wrappers, and possibly when it's used for running tests.
58 lines
1.0 KiB
Nix
58 lines
1.0 KiB
Nix
{ stdenv
|
|
, lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, python
|
|
, cffi
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, ApplicationServices
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pymunk";
|
|
version = "6.4.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
extension = "zip";
|
|
hash = "sha256-YNzZ/wQz5s5J5ctXekNo0FksRoX03rZE1wXIghYcck4=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
cffi
|
|
];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
ApplicationServices
|
|
];
|
|
|
|
preBuild = ''
|
|
${python.pythonForBuild.interpreter} setup.py build_ext --inplace
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
"pymunk/tests"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"pymunk"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "2d physics library";
|
|
homepage = "https://www.pymunk.org";
|
|
changelog = "https://github.com/viblo/pymunk/releases/tag/${version}";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ emilytrau ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|