diff --git a/pkgs/development/python-modules/pydantic-zarr/default.nix b/pkgs/development/python-modules/pydantic-zarr/default.nix new file mode 100644 index 000000000000..91e8ca9f312a --- /dev/null +++ b/pkgs/development/python-modules/pydantic-zarr/default.nix @@ -0,0 +1,64 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + hatch-vcs, + hatchling, + + # dependencies + numpy, + packaging, + pydantic, + + # tests + dask, + pytest-examples, + pytestCheckHook, + xarray, +}: + +buildPythonPackage (finalAttrs: { + pname = "pydantic-zarr"; + version = "0.9.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "zarr-developers"; + repo = "pydantic-zarr"; + tag = "v${finalAttrs.version}"; + hash = "sha256-rgtRN3EXSORa2g2a4aCZacCDLeWM6BosZe5XR0Pg6pU="; + }; + + build-system = [ + hatch-vcs + hatchling + ]; + + dependencies = [ + numpy + packaging + pydantic + ]; + + pythonImportsCheck = [ "pydantic_zarr" ]; + + nativeCheckInputs = [ + dask + pytest-examples + pytestCheckHook + xarray + ]; + + meta = { + description = "Pydantic models for Zarr"; + homepage = "https://github.com/zarr-developers/pydantic-zarr"; + changelog = "https://github.com/zarr-developers/pydantic-zarr/releases/tag/${finalAttrs.src.tag}"; + license = with lib.licenses; [ + bsd3 + mit + ]; + maintainers = with lib.maintainers; [ GaetanLepage ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ba53cbfaf701..61905b8100a9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13312,6 +13312,8 @@ self: super: with self; { pydantic-settings = callPackage ../development/python-modules/pydantic-settings { }; + pydantic-zarr = callPackage ../development/python-modules/pydantic-zarr { }; + pydantic_1 = callPackage ../development/python-modules/pydantic/1.nix { }; pydash = callPackage ../development/python-modules/pydash { };