2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
git,
|
|
|
|
hatch-vcs,
|
|
|
|
hatchling,
|
|
|
|
importlib-metadata,
|
|
|
|
pydantic,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2024-01-13 08:15:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pydantic-compat";
|
|
|
|
version = "0.1.2";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyapp-kit";
|
|
|
|
repo = "pydantic-compat";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-YJUfWu+nyGlwpJpxYghCKzj3CasdAaqYoNVCcfo/7YE=";
|
|
|
|
leaveDotGit = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
git
|
|
|
|
hatch-vcs
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
importlib-metadata
|
|
|
|
pydantic
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pydantic_compat" ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Compatibility layer for pydantic v1/v2";
|
|
|
|
homepage = "https://github.com/pyapp-kit/pydantic-compat";
|
|
|
|
changelog = "https://github.com/pyapp-kit/pydantic-compat/releases/tag/v${version}";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|