diff --git a/pkgs/development/python-modules/uvicorn/default.nix b/pkgs/development/python-modules/uvicorn/default.nix index e8b2520393ca..26d23f08afa4 100644 --- a/pkgs/development/python-modules/uvicorn/default.nix +++ b/pkgs/development/python-modules/uvicorn/default.nix @@ -9,9 +9,8 @@ , pyyaml , typing-extensions , uvloop -, watchgod +, watchfiles , websockets -, wsproto , pythonOlder }: @@ -35,15 +34,17 @@ buildPythonPackage rec { propagatedBuildInputs = [ click h11 + ] ++ lib.optionals (pythonOlder "3.8") [ + typing-extensions + ]; + + passthru.optional-dependencies.standard = [ httptools python-dotenv pyyaml uvloop - watchgod + watchfiles websockets - wsproto - ] ++ lib.optionals (pythonOlder "3.8") [ - typing-extensions ]; postInstall = '' diff --git a/pkgs/development/python-modules/uvicorn/tests.nix b/pkgs/development/python-modules/uvicorn/tests.nix index 2fc0e932b8e9..b9cd883f43c0 100644 --- a/pkgs/development/python-modules/uvicorn/tests.nix +++ b/pkgs/development/python-modules/uvicorn/tests.nix @@ -1,5 +1,6 @@ { stdenv , buildPythonPackage +, asgiref , uvicorn , httpx , pytest-asyncio @@ -7,6 +8,8 @@ , pytest-mock , requests , trustme +, watchgod +, wsproto }: buildPythonPackage rec { @@ -19,6 +22,7 @@ buildPythonPackage rec { dontInstall = true; checkInputs = [ + asgiref uvicorn httpx pytestCheckHook @@ -26,7 +30,12 @@ buildPythonPackage rec { pytest-mock requests trustme - ]; + + # strictly optional dependencies + watchgod + wsproto + ] + ++ uvicorn.optional-dependencies.standard; doCheck = !stdenv.isDarwin;