1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, ujson
5, email_validator
6, typing-extensions
7, python
8, isPy3k
9, pytest
10, pytestcov
11}:
12
13buildPythonPackage rec {
14 pname = "pydantic";
15 version = "1.4";
16 disabled = !isPy3k;
17
18 src = fetchFromGitHub {
19 owner = "samuelcolvin";
20 repo = pname;
21 rev = "v${version}";
22 sha256 = "1zmnwyvvrj6nb2r1wh63yb6dzqaxw8m4njzqycjdq9911c5gwg6z";
23 };
24
25 propagatedBuildInputs = [
26 ujson
27 email_validator
28 typing-extensions
29 ];
30
31 checkInputs = [
32 pytest
33 pytestcov
34 ];
35
36 checkPhase = ''
37 pytest
38 '';
39
40 meta = with lib; {
41 homepage = "https://github.com/samuelcolvin/pydantic";
42 description = "Data validation and settings management using Python type hinting";
43 license = licenses.mit;
44 maintainers = with maintainers; [ wd15 ];
45 };
46}