Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 git, 6 hatch-vcs, 7 hatchling, 8 importlib-metadata, 9 pydantic, 10 pytestCheckHook, 11 pythonOlder, 12}: 13 14buildPythonPackage rec { 15 pname = "pydantic-compat"; 16 version = "0.1.2"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "pyapp-kit"; 23 repo = "pydantic-compat"; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-YJUfWu+nyGlwpJpxYghCKzj3CasdAaqYoNVCcfo/7YE="; 26 leaveDotGit = true; 27 }; 28 29 nativeBuildInputs = [ 30 git 31 hatch-vcs 32 hatchling 33 ]; 34 35 propagatedBuildInputs = [ 36 importlib-metadata 37 pydantic 38 ]; 39 40 nativeCheckInputs = [ pytestCheckHook ]; 41 42 pythonImportsCheck = [ "pydantic_compat" ]; 43 44 meta = with lib; { 45 description = "Compatibility layer for pydantic v1/v2"; 46 homepage = "https://github.com/pyapp-kit/pydantic-compat"; 47 changelog = "https://github.com/pyapp-kit/pydantic-compat/releases/tag/v${version}"; 48 license = licenses.bsd3; 49 maintainers = with maintainers; [ fab ]; 50 }; 51}