diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/fastapi/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/fastapi/default.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/fastapi/default.nix b/nixpkgs/pkgs/development/python-modules/fastapi/default.nix new file mode 100644 index 000000000000..89431d8b52f8 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/fastapi/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchPypi +, uvicorn +, starlette +, pydantic +, python +, isPy3k +, which +}: + +buildPythonPackage rec { + pname = "fastapi"; + version = "0.33.0"; + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "1mc8ljfk6xyn2cq725s8hgapp62z5mylzw9akvkhwwz3bh8m5a7f"; + }; + + propagatedBuildInputs = [ + uvicorn + starlette + pydantic + ]; + + patches = [ ./setup.py.patch ]; + + checkPhase = '' + ${python.interpreter} -c "from fastapi import FastAPI; app = FastAPI()" + ''; + + meta = with lib; { + homepage = "https://github.com/tiangolo/fastapi"; + description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"; + license = licenses.mit; + maintainers = with maintainers; [ wd15 ]; + }; +} |