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

47 lines
968 B
Nix
Raw Normal View History

# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{
lib,
python3,
fetchPypi,
pydantic-core,
2023-09-26 20:56:55 +02:00
}:
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 ];
2023-09-26 20:56:55 +02:00
};
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";
};
}