1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 setuptools-scm,
7 numpy,
8 cython,
9 extension-helpers,
10 hankel,
11 emcee,
12 meshio,
13 pyevtk,
14 scipy,
15 pytestCheckHook,
16}:
17
18buildPythonPackage rec {
19 pname = "gstools";
20 version = "1.6.0";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "GeoStat-Framework";
25 repo = "GSTools";
26 rev = "refs/tags/v${version}";
27 hash = "sha256-QpdOARzcSRVFl/DbnE2JLBFZmTSh/fBOmzweuf+zfEs=";
28 };
29
30 build-system = [
31 setuptools
32 setuptools-scm
33 numpy
34 cython
35 extension-helpers
36 ];
37
38 dependencies = [
39 emcee
40 hankel
41 meshio
42 numpy
43 pyevtk
44 scipy
45 ];
46
47 # scipy derivation dont support numpy_2 and is patched to use version 1
48 # Using numpy_2 in the derivation will cause a clojure duplicate error
49 postPatch = ''
50 substituteInPlace pyproject.toml \
51 --replace-fail 'numpy>=2.0.0rc1,' 'numpy' \
52 '';
53
54 pythonImportsCheck = [ "gstools" ];
55 nativeCheckInputs = [ pytestCheckHook ];
56
57 meta = {
58 description = "Geostatistical toolbox";
59 homepage = "https://github.com/GeoStat-Framework/GSTools";
60 changelog = "https://github.com/GeoStat-Framework/GSTools/blob/${src.rev}/CHANGELOG.md";
61 license = lib.licenses.lgpl3Only;
62 maintainers = with lib.maintainers; [ sigmanificient ];
63 };
64}