1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 flit-core, 6 pytestCheckHook, 7 cerberus, 8 django, 9 djangorestframework, 10 marshmallow, 11 pyschemes, 12 wtforms, 13 email-validator, 14}: 15 16buildPythonPackage rec { 17 pname = "vaa"; 18 version = "0.2.1"; 19 format = "pyproject"; 20 21 src = fetchFromGitHub { 22 owner = "life4"; 23 repo = "vaa"; 24 tag = "v.${version}"; 25 hash = "sha256-24GTTJSZ55ejyHoWP1/S3DLTKvOolAJr9UhWoOm84CU="; 26 }; 27 28 postPatch = '' 29 substituteInPlace pyproject.toml \ 30 --replace "requires = [\"flit\"]" "requires = [\"flit_core\"]" \ 31 --replace "build-backend = \"flit.buildapi\"" "build-backend = \"flit_core.buildapi\"" 32 ''; 33 34 nativeBuildInputs = [ flit-core ]; 35 36 nativeCheckInputs = [ 37 pytestCheckHook 38 cerberus 39 django 40 djangorestframework 41 marshmallow 42 pyschemes 43 wtforms 44 email-validator 45 ]; 46 47 pythonImportsCheck = [ "vaa" ]; 48 49 meta = with lib; { 50 description = "VAlidators Adapter makes validation by any existing validator with the same interface"; 51 homepage = "https://github.com/life4/vaa"; 52 license = licenses.mit; 53 maintainers = with maintainers; [ gador ]; 54 }; 55}