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