blob: 33ed206578ed78c784a08f2732efe106a032d8ac (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
{ 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 ];
};
}
|