about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pydantic/default.nix
blob: ef33b6fb2bd52a6fd9e554989257f5660cea9545 (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, ujson
, email_validator
, typing-extensions
, python
, isPy3k
, pytest
, pytestcov
}:

buildPythonPackage rec {
  pname = "pydantic";
  version = "1.5.1";
  disabled = !isPy3k;

  src = fetchFromGitHub {
    owner = "samuelcolvin";
    repo = pname;
    rev = "v${version}";
    sha256 = "0fwrx7p6d5vskg9ibganahiz9y9299idvdmzhjw62jy84gn1vrb4";
  };

  propagatedBuildInputs = [
    ujson
    email_validator
    typing-extensions
  ];

  checkInputs = [
    pytest
    pytestcov
  ];

  checkPhase = ''
    pytest
  '';

  meta = with lib; {
    homepage = "https://github.com/samuelcolvin/pydantic";
    description = "Data validation and settings management using Python type hinting";
    license = licenses.mit;
    maintainers = with maintainers; [ wd15 ];
  };
}