depot/third_party/nixpkgs/pkgs/development/python-modules/fastapi/default.nix
Default email 3e2acf8aff Project import generated by Copybara.
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
2021-05-20 18:08:51 -05:00

63 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pydantic
, starlette
, pytestCheckHook
, pytest-asyncio
, aiosqlite
, databases
, flask
, httpx
, passlib
, peewee
, python-jose
, sqlalchemy
}:
buildPythonPackage rec {
pname = "fastapi";
version = "0.65.0";
format = "flit";
src = fetchFromGitHub {
owner = "tiangolo";
repo = "fastapi";
rev = version;
sha256 = "sha256-DPfijCGORF3ThZblqaYTKN0H8+wlhtdIS8lfKfJl/bY=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "starlette ==" "starlette >="
'';
propagatedBuildInputs = [
starlette
pydantic
];
checkInputs = [
aiosqlite
databases
flask
httpx
passlib
peewee
python-jose
pytestCheckHook
pytest-asyncio
sqlalchemy
];
# disabled tests require orjson which requires rust nightly
pytestFlagsArray = [ "--ignore=tests/test_default_response_class.py" ];
disabledTests = [ "test_get_custom_response" ];
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 ];
};
}