Files
nixpkgs/pkgs/development/python-modules/mapbox-earcut/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

65 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
# build-system
cmake,
ninja,
pybind11,
scikit-build-core,
# dependencies
numpy,
# tests
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "mapbox-earcut";
version = "1.0.3";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "skogler";
repo = "mapbox_earcut_python";
tag = "v${version}";
hash = "sha256-2dUZ78yWSudjozV2zIRNQgUeaNrkL+NXnF51q4T+dRU=";
};
build-system = [
pybind11
scikit-build-core
];
nativeBuildInputs = [
cmake
ninja
];
dontUseCmakeConfigure = true;
dependencies = [ numpy ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "mapbox_earcut" ];
meta = {
homepage = "https://github.com/skogler/mapbox_earcut_python";
changelog = "https://github.com/skogler/mapbox_earcut_python/releases/tag/${src.tag}";
license = lib.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 = [ ];
};
}