nixpkgs/pkgs/development/python-modules/mapbox-earcut/default.nix
2022-05-29 15:16:21 +02:00

42 lines
969 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, numpy
, pybind11
, pytestCheckHook
, setuptools
}:
buildPythonPackage rec {
pname = "mapbox-earcut";
version = "1.0.0";
src = fetchFromGitHub {
owner = "skogler";
repo = "mapbox_earcut_python";
rev = "v${version}";
sha256 = "m4q2qTL55fkdi3hm75C3/XV9SUQkpJS+B5SEgpPEctk=";
};
nativeBuildInputs = [ setuptools pybind11 ];
propagatedBuildInputs = [ numpy ];
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "mapbox_earcut" ];
meta = with lib; {
homepage = "https://github.com/skogler/mapbox_earcut_python";
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 ];
};
}