1{ 2 lib, 3 buildPythonPackage, 4 python, 5 fetchFromGitHub, 6 scikit-build-core, 7 cmake, 8 ninja, 9 nanobind, 10 pkg-config, 11 numpy, 12 clipper2, 13 tbb, 14 pytestCheckHook, 15 trimesh, 16}: 17 18buildPythonPackage rec { 19 pname = "manifold3d"; 20 version = "3.0.1"; 21 pyproject = true; 22 23 src = fetchFromGitHub { 24 owner = "elalish"; 25 repo = "manifold"; 26 tag = "v${version}"; 27 hash = "sha256-wbeWxAeKyqjEPemc2e5n357gwq83pQlASOvMd0ZCE7g="; 28 }; 29 30 dontUseCmakeConfigure = true; 31 32 build-system = [ 33 scikit-build-core 34 cmake 35 ninja 36 nanobind 37 pkg-config 38 ]; 39 40 dependencies = [ 41 numpy 42 ]; 43 44 buildInputs = [ 45 tbb 46 clipper2 47 ]; 48 49 nativeCheckInputs = [ 50 pytestCheckHook 51 trimesh 52 ]; 53 54 preCheck = '' 55 ${python.interpreter} bindings/python/examples/run_all.py 56 ''; 57 58 pythonImportsCheck = [ 59 "manifold3d" 60 ]; 61 62 meta = { 63 description = "Geometry library for topological robustness"; 64 homepage = "https://github.com/elalish/manifold"; 65 changelog = "https://github.com/elalish/manifold/releases/tag/v${version}"; 66 license = lib.licenses.asl20; 67 maintainers = with lib.maintainers; [ 68 pbsds 69 pca006132 70 ]; 71 }; 72}