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