From ea1fafe29860d47f81ea0e826654d30424a5fa8a Mon Sep 17 00:00:00 2001 From: natsukium Date: Fri, 24 Nov 2023 13:42:36 +0900 Subject: [PATCH] python311Packages.fastapi: add optional-dependencies for pydantic 2 --- pkgs/development/python-modules/fastapi/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/fastapi/default.nix b/pkgs/development/python-modules/fastapi/default.nix index 3397c3bd2882..5aab1ed269c6 100644 --- a/pkgs/development/python-modules/fastapi/default.nix +++ b/pkgs/development/python-modules/fastapi/default.nix @@ -32,6 +32,8 @@ , orjson , email-validator , uvicorn +, pydantic-settings +, pydantic-extra-types }: buildPythonPackage rec { @@ -75,8 +77,9 @@ buildPythonPackage rec { orjson email-validator uvicorn - # pydantic-settings - # pydantic-extra-types + ] ++ lib.optionals (lib.versionAtLeast pydantic.version "2") [ + pydantic-settings + pydantic-extra-types ] ++ uvicorn.optional-dependencies.standard; nativeCheckInputs = [