2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
numpy,
|
|
|
|
pybind11,
|
|
|
|
pytestCheckHook,
|
|
|
|
setuptools,
|
|
|
|
pythonOlder,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mapbox-earcut";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.0.1";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "skogler";
|
|
|
|
repo = "mapbox_earcut_python";
|
2022-12-17 10:02:37 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-+Vxvo++bkoCsJFmt/u1eaqhgpz8Uddz06iIi66ju+MQ=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
pybind11
|
|
|
|
];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ numpy ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "mapbox_earcut" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/skogler/mapbox_earcut_python";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/skogler/mapbox_earcut_python/releases/tag/v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = licenses.isc;
|
|
|
|
description = "Mapbox-earcut fast triangulation of 2D-polygons";
|
|
|
|
longDescription = ''
|
|
|
|
Python bindings for the C++ implementation of the Mapbox Earcut
|
|
|
|
library, which provides very fast and quite robust triangulation of 2D
|
|
|
|
polygons.
|
|
|
|
'';
|
|
|
|
maintainers = with maintainers; [ friedelino ];
|
|
|
|
};
|
|
|
|
}
|