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

50 lines
934 B
Nix
Raw Normal View History

2019-07-25 23:26:49 +02:00
{ lib
, buildPythonPackage
, email_validator
2021-02-28 18:12:20 +01:00
, fetchFromGitHub
, pytest-mock
2021-02-28 18:12:20 +01:00
, pytestCheckHook
, python-dotenv
, pythonOlder
, typing-extensions
, ujson
2019-07-25 23:26:49 +02:00
}:
buildPythonPackage rec {
pname = "pydantic";
version = "1.8.2";
2021-02-28 18:12:20 +01:00
disabled = pythonOlder "3.7";
2019-07-25 23:26:49 +02:00
src = fetchFromGitHub {
owner = "samuelcolvin";
repo = pname;
rev = "v${version}";
sha256 = "06162dss6mvi7wiy2lzxwvzajwxgy8b2fyym7qipaj7zibcqalq2";
2019-07-25 23:26:49 +02:00
};
propagatedBuildInputs = [
email_validator
2021-02-28 18:12:20 +01:00
python-dotenv
2019-07-25 23:26:49 +02:00
typing-extensions
2021-02-28 18:12:20 +01:00
ujson
2019-07-25 23:26:49 +02:00
];
checkInputs = [
pytest-mock
2021-02-28 18:12:20 +01:00
pytestCheckHook
];
2019-07-25 23:26:49 +02:00
2021-02-28 18:12:20 +01:00
preCheck = ''
export HOME=$(mktemp -d)
2019-07-25 23:26:49 +02:00
'';
2021-02-28 18:12:20 +01:00
pythonImportsCheck = [ "pydantic" ];
2019-07-25 23:26:49 +02: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 ];
};
}