depot/third_party/nixpkgs/pkgs/development/python-modules/pydantic/default.nix
Default email 75ca762b89 Project import generated by Copybara.
GitOrigin-RevId: 29b0d4d0b600f8f5dd0b86e3362a33d4181938f9
2021-03-09 11:18:52 +08:00

49 lines
931 B
Nix

{ lib
, buildPythonPackage
, email_validator
, fetchFromGitHub
, pytest-mock
, pytestCheckHook
, python-dotenv
, pythonOlder
, typing-extensions
, ujson
}:
buildPythonPackage rec {
pname = "pydantic";
version = "1.8";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "samuelcolvin";
repo = pname;
rev = "v${version}";
sha256 = "sha256-+HfnM/IrFlUyQJdiOYyaJUNenh8dLtd8CUJWSbn6hwQ=";
};
propagatedBuildInputs = [
email_validator
python-dotenv
typing-extensions
ujson
];
checkInputs = [
pytest-mock
pytestCheckHook
];
preCheck = ''
export HOME=$(mktemp -d)
'';
pythonImportsCheck = [ "pydantic" ];
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 ];
};
}