1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 poetry-core,
7 pytestCheckHook,
8 numpy,
9 typing-extensions,
10 xarray,
11}:
12
13buildPythonPackage rec {
14 pname = "xarray-dataclasses";
15 version = "1.9.1";
16 pyproject = true;
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "astropenguin";
22 repo = "xarray-dataclasses";
23 tag = "v${version}";
24 hash = "sha256-p9xV9Mpk5fsWR8X6VWNaeRi66OqK4QQWA8pwD2aYqOU=";
25 };
26
27 nativeBuildInputs = [
28 poetry-core
29 ];
30
31 pythonRelaxDeps = [ "xarray" ];
32
33 propagatedBuildInputs = [
34 numpy
35 typing-extensions
36 xarray
37 ];
38
39 nativeCheckInputs = [ pytestCheckHook ];
40
41 pythonImportsCheck = [ "xarray_dataclasses" ];
42
43 meta = with lib; {
44 description = "Xarray data creation made easy by dataclass";
45 homepage = "https://github.com/astropenguin/xarray-dataclasses";
46 changelog = "https://github.com/astropenguin/xarray-dataclasses/releases/tag/v${version}";
47 license = licenses.mit;
48 maintainers = with maintainers; [ bcdarwin ];
49 };
50}