nixpkgs/pkgs/development/python-modules/pydantic-settings/default.nix
Martin Weinelt 29d27793fa python311Packages.pydantic-settings: init at 2.0.3
Packaged for fastapi tests.
2023-09-27 15:34:41 +02:00

52 lines
927 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, hatchling
, pydantic
, python-dotenv
, pytestCheckHook
, pytest-examples
, pytest-mock
}:
buildPythonPackage rec {
pname = "pydantic-settings";
version = "2.0.3";
format = "pyproject";
src = fetchFromGitHub {
owner = "pydantic";
repo = "pydantic-settings";
rev = "v${version}";
hash = "sha256-3V6daCibvVr8RKo2o+vHC++QgIYKAOyRg11ATrCzM5Y=";
};
nativeBuildInputs = [
hatchling
];
propagatedBuildInputs = [
pydantic
python-dotenv
];
pythonImportsCheck = [ "pydantic_settings" ];
nativeCheckInputs = [
pytestCheckHook
pytest-examples
pytest-mock
];
preCheck = ''
export HOME=$TMPDIR
'';
meta = with lib; {
description = "Settings management using pydantic";
homepage = "https://github.com/pydantic/pydantic-settings";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}