depot/third_party/nixpkgs/pkgs/development/python-modules/pydantic-compat/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

54 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, git
, hatch-vcs
, hatchling
, importlib-metadata
, pydantic
, pytestCheckHook
, pythonOlder
}:
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
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"pydantic_compat"
];
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 ];
};
}