2019-07-25 22:26:49 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2019-12-29 18:09:43 +00:00
|
|
|
, fetchFromGitHub
|
2019-07-25 22:26:49 +01:00
|
|
|
, ujson
|
|
|
|
, email_validator
|
|
|
|
, typing-extensions
|
|
|
|
, python
|
|
|
|
, isPy3k
|
2019-12-29 18:09:43 +00:00
|
|
|
, pytest
|
|
|
|
, pytestcov
|
2020-12-27 15:10:07 +00:00
|
|
|
, pytest-mock
|
2019-07-25 22:26:49 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pydantic";
|
2020-12-27 15:10:07 +00:00
|
|
|
version = "1.7.3";
|
2019-07-25 22:26:49 +01:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2019-12-29 18:09:43 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "samuelcolvin";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-12-27 15:10:07 +00:00
|
|
|
sha256 = "xihEDmly0vprmA+VdeCoGXg9PjWRPmBWAwk/9f2DLts=";
|
2019-07-25 22:26:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
ujson
|
|
|
|
email_validator
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
2019-12-29 18:09:43 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
pytestcov
|
2020-12-27 15:10:07 +00:00
|
|
|
pytest-mock
|
2019-12-29 18:09:43 +00:00
|
|
|
];
|
2019-07-25 22:26:49 +01:00
|
|
|
|
2019-12-29 18:09:43 +00:00
|
|
|
checkPhase = ''
|
|
|
|
pytest
|
2019-07-25 22:26:49 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|