nixpkgs/pkgs/development/python-modules/pydantic/default.nix

47 lines
814 B
Nix
Raw Normal View History

2019-07-25 22:26:49 +01:00
{ lib
, buildPythonPackage
, fetchFromGitHub
2019-07-25 22:26:49 +01:00
, ujson
, email_validator
, typing-extensions
, python
, isPy3k
, pytest
, pytestcov
2019-07-25 22:26:49 +01:00
}:
buildPythonPackage rec {
pname = "pydantic";
2020-02-09 14:59:54 +00:00
version = "1.4";
2019-07-25 22:26:49 +01:00
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "samuelcolvin";
repo = pname;
rev = "v${version}";
2020-02-09 14:59:54 +00:00
sha256 = "1zmnwyvvrj6nb2r1wh63yb6dzqaxw8m4njzqycjdq9911c5gwg6z";
2019-07-25 22:26:49 +01:00
};
propagatedBuildInputs = [
ujson
email_validator
typing-extensions
];
checkInputs = [
pytest
pytestcov
];
2019-07-25 22:26:49 +01: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 ];
};
}