1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 cython,
8 hatch-vcs,
9 hatchling,
10
11 # dependencies
12 emcee,
13 gstools-cython,
14 hankel,
15 meshio,
16 numpy,
17 pyevtk,
18 scipy,
19
20 # optional dependencies
21 matplotlib,
22 pyvista,
23
24 # tests
25 pytestCheckHook,
26 pytest-cov-stub,
27}:
28
29buildPythonPackage rec {
30 pname = "gstools";
31 version = "1.7.0";
32 pyproject = true;
33
34 src = fetchFromGitHub {
35 owner = "GeoStat-Framework";
36 repo = "GSTools";
37 tag = "v${version}";
38 hash = "sha256-rQ7mSa1BWAaRiiE6aQD6jl8BktihY9bjFJV+5eT9n/M=";
39 };
40
41 build-system = [
42 hatch-vcs
43 hatchling
44 ];
45
46 dependencies = [
47 emcee
48 gstools-cython
49 hankel
50 meshio
51 numpy
52 pyevtk
53 scipy
54 ];
55
56 optional-dependencies = {
57 plotting = [
58 matplotlib
59 pyvista
60 ];
61 };
62
63 pythonImportsCheck = [ "gstools" ];
64 nativeCheckInputs = [
65 pytestCheckHook
66 pytest-cov-stub
67 ]
68 ++ lib.flatten (lib.attrValues optional-dependencies);
69
70 meta = {
71 description = "Geostatistical toolbox";
72 homepage = "https://github.com/GeoStat-Framework/GSTools";
73 changelog = "https://github.com/GeoStat-Framework/GSTools/blob/${src.tag}/CHANGELOG.md";
74 license = lib.licenses.lgpl3Only;
75 maintainers = with lib.maintainers; [ sigmanificient ];
76 };
77}