1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 cython,
6 numpy,
7 setuptools,
8 wheel,
9 pytestCheckHook,
10 pyvista,
11 nix-update-script,
12}:
13
14buildPythonPackage rec {
15 pname = "fast-simplification";
16 version = "0.1.12";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "pyvista";
21 repo = "fast-simplification";
22 tag = "v${version}";
23 hash = "sha256-OhVJKYmJR+A6JDaM/7Bfkc4PNlhsc6NgRNU+SokCg1U=";
24 };
25
26 build-system = [
27 cython
28 numpy
29 setuptools
30 wheel
31 ];
32
33 dependencies = [
34 numpy
35 ];
36
37 nativeCheckInputs = [
38 pytestCheckHook
39 pyvista
40 ];
41
42 disabledTests = [
43 # need network to download data
44 "test_collapses_louis"
45 "test_human"
46 ];
47
48 # make sure import the built version, not the source one
49 preCheck = ''
50 rm -r fast_simplification
51 '';
52
53 pythonImportsCheck = [
54 "fast_simplification"
55 ];
56
57 passthru.updateScript = nix-update-script { };
58
59 meta = {
60 description = "Fast Quadratic Mesh Simplification";
61 homepage = "https://github.com/pyvista/fast-simplification";
62 changelog = "https://github.com/pyvista/fast-simplification/releases/tag/v${version}";
63 license = lib.licenses.mit;
64 maintainers = with lib.maintainers; [
65 yzx9
66 ];
67 };
68}