blob: 54c2520ee6654c1668b4bc58c04d81e759b496ad (
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
55
56
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, flit-core
, pytestCheckHook
, cerberus
, django
, djangorestframework
, marshmallow
, pyschemes
, wtforms
, email-validator
}:
buildPythonPackage rec {
pname = "vaa";
version = "0.2.1";
format = "pyproject";
src = fetchFromGitHub {
owner = "life4";
repo = pname;
rev = "refs/tags/v.${version}";
hash = "sha256-24GTTJSZ55ejyHoWP1/S3DLTKvOolAJr9UhWoOm84CU=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "requires = [\"flit\"]" "requires = [\"flit_core\"]" \
--replace "build-backend = \"flit.buildapi\"" "build-backend = \"flit_core.buildapi\""
'';
nativeBuildInputs = [
flit-core
];
nativeCheckInputs = [
pytestCheckHook
cerberus
django
djangorestframework
marshmallow
pyschemes
wtforms
email-validator
];
pythonImportsCheck = [ "vaa" ];
meta = with lib; {
description = "VAlidators Adapter makes validation by any existing validator with the same interface";
homepage = "https://github.com/life4/vaa";
license = licenses.mit;
maintainers = with maintainers; [ gador ];
};
}
|