2019-07-26 16:15:36 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2019-12-29 18:08:35 +00:00
|
|
|
, fetchFromGitHub
|
2019-07-26 16:15:36 +00:00
|
|
|
, pydantic
|
2021-01-04 09:36:49 +00:00
|
|
|
, starlette
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-asyncio
|
2019-12-29 18:08:35 +00:00
|
|
|
, aiosqlite
|
2021-01-04 09:36:49 +00:00
|
|
|
, databases
|
2020-04-07 18:02:51 +00:00
|
|
|
, flask
|
2021-01-04 09:36:49 +00:00
|
|
|
, httpx
|
|
|
|
, passlib
|
|
|
|
, peewee
|
|
|
|
, python-jose
|
|
|
|
, sqlalchemy
|
2019-07-26 16:15:36 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fastapi";
|
2021-08-24 21:02:18 +00:00
|
|
|
version = "0.68.1";
|
2019-12-29 18:08:35 +00:00
|
|
|
format = "flit";
|
2019-07-26 16:15:36 +00:00
|
|
|
|
2019-12-29 18:08:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tiangolo";
|
|
|
|
repo = "fastapi";
|
|
|
|
rev = version;
|
2021-08-24 21:02:18 +00:00
|
|
|
sha256 = "sha256-zwfopyig4ImMbkx89l8SsLW8PzoVcDN5KSd7a7fOnms=";
|
2019-07-26 16:15:36 +00:00
|
|
|
};
|
|
|
|
|
2020-05-11 18:43:40 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2021-05-10 14:32:20 +00:00
|
|
|
--replace "starlette ==" "starlette >="
|
2020-05-11 18:43:40 +00:00
|
|
|
'';
|
|
|
|
|
2019-07-26 16:15:36 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
starlette
|
|
|
|
pydantic
|
|
|
|
];
|
|
|
|
|
2019-12-29 18:08:35 +00:00
|
|
|
checkInputs = [
|
|
|
|
aiosqlite
|
2021-01-04 09:36:49 +00:00
|
|
|
databases
|
2020-04-07 18:02:51 +00:00
|
|
|
flask
|
2021-01-04 09:36:49 +00:00
|
|
|
httpx
|
|
|
|
passlib
|
|
|
|
peewee
|
|
|
|
python-jose
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-asyncio
|
|
|
|
sqlalchemy
|
2019-12-29 18:08:35 +00:00
|
|
|
];
|
|
|
|
|
2021-01-04 09:36:49 +00:00
|
|
|
# disabled tests require orjson which requires rust nightly
|
2021-07-22 19:49:28 +00:00
|
|
|
|
|
|
|
# ignoring deprecation warnings to avoid test failure from
|
|
|
|
# tests/test_tutorial/test_testing/test_tutorial001.py
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "--ignore=tests/test_default_response_class.py" "-W ignore::DeprecationWarning"];
|
2021-01-04 09:36:49 +00:00
|
|
|
disabledTests = [ "test_get_custom_response" ];
|
2019-07-26 16:15:36 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|