1{ lib
2, buildPythonPackage
3, fetchPypi
4, fetchFromGitHub
5, numpy
6, pybind11
7, pytestCheckHook
8, setuptools
9}:
10
11buildPythonPackage rec {
12 pname = "mapbox-earcut";
13 version = "1.0.0";
14
15 src = fetchFromGitHub {
16 owner = "skogler";
17 repo = "mapbox_earcut_python";
18 rev = "v${version}";
19 sha256 = "m4q2qTL55fkdi3hm75C3/XV9SUQkpJS+B5SEgpPEctk=";
20 };
21
22 nativeBuildInputs = [ setuptools pybind11 ];
23
24 propagatedBuildInputs = [ numpy ];
25
26 checkInputs = [ pytestCheckHook ];
27
28 pythonImportsCheck = [ "mapbox_earcut" ];
29
30 meta = with lib; {
31 homepage = "https://github.com/skogler/mapbox_earcut_python";
32 license = licenses.isc;
33 description = "Mapbox-earcut fast triangulation of 2D-polygons";
34 longDescription = ''
35 Python bindings for the C++ implementation of the Mapbox Earcut
36 library, which provides very fast and quite robust triangulation of 2D
37 polygons.
38 '';
39 maintainers = with maintainers; [ friedelino ];
40 };
41}