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