infrastructure/machines/compute01/satosa/package/pydantic.nix

42 lines
861 B
Nix

{
lib,
python3,
fetchPypi,
pydantic-core,
}:
python3.pkgs.buildPythonPackage rec {
pname = "pydantic";
version = "2.4.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-sXJQWIYCjkNWho1hfS0ad2168WJdExNFD9Ub3RnZ1h8=";
};
nativeBuildInputs = [
python3.pkgs.hatch-fancy-pypi-readme
python3.pkgs.hatchling
];
propagatedBuildInputs = with python3.pkgs; [
annotated-types
pydantic-core
typing-extensions
];
passthru.optional-dependencies = with python3.pkgs; {
email = [ email-validator ];
};
pythonImportsCheck = [ "pydantic" ];
meta = with lib; {
description = "Data validation using Python type hints";
homepage = "https://pypi.org/project/pydantic";
license = licenses.mit;
maintainers = with maintainers; [ ];
mainProgram = "pydantic";
};
}