1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 7 # build-system 8 cmake, 9 ninja, 10 pybind11, 11 scikit-build-core, 12 13 # dependencies 14 numpy, 15 16 # tests 17 pytestCheckHook, 18}: 19 20buildPythonPackage rec { 21 pname = "mapbox-earcut"; 22 version = "1.0.3"; 23 pyproject = true; 24 25 disabled = pythonOlder "3.7"; 26 27 src = fetchFromGitHub { 28 owner = "skogler"; 29 repo = "mapbox_earcut_python"; 30 tag = "v${version}"; 31 hash = "sha256-2dUZ78yWSudjozV2zIRNQgUeaNrkL+NXnF51q4T+dRU="; 32 }; 33 34 build-system = [ 35 pybind11 36 scikit-build-core 37 ]; 38 39 nativeBuildInputs = [ 40 cmake 41 ninja 42 ]; 43 44 dontUseCmakeConfigure = true; 45 46 dependencies = [ numpy ]; 47 48 nativeCheckInputs = [ pytestCheckHook ]; 49 50 pythonImportsCheck = [ "mapbox_earcut" ]; 51 52 meta = with lib; { 53 homepage = "https://github.com/skogler/mapbox_earcut_python"; 54 changelog = "https://github.com/skogler/mapbox_earcut_python/releases/tag/${src.tag}"; 55 license = licenses.isc; 56 description = "Mapbox-earcut fast triangulation of 2D-polygons"; 57 longDescription = '' 58 Python bindings for the C++ implementation of the Mapbox Earcut 59 library, which provides very fast and quite robust triangulation of 2D 60 polygons. 61 ''; 62 maintainers = [ ]; 63 }; 64}