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
|
|
|
, uvicorn
|
|
|
|
, starlette
|
|
|
|
, pydantic
|
|
|
|
, isPy3k
|
2019-12-29 18:08:35 +00:00
|
|
|
, pytest
|
|
|
|
, pytestcov
|
|
|
|
, pyjwt
|
|
|
|
, passlib
|
|
|
|
, aiosqlite
|
2020-02-28 16:36:20 +00:00
|
|
|
, peewee
|
2020-04-07 18:02:51 +00:00
|
|
|
, flask
|
2019-07-26 16:15:36 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fastapi";
|
2020-06-23 07:06:38 +00:00
|
|
|
version = "0.55.1";
|
2019-12-29 18:08:35 +00:00
|
|
|
format = "flit";
|
2019-07-26 16:15:36 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2019-12-29 18:08:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tiangolo";
|
|
|
|
repo = "fastapi";
|
|
|
|
rev = version;
|
2020-06-23 07:06:38 +00:00
|
|
|
sha256 = "1515nhwari48v0angyl5z3cfpvwn4al2nvqh0cjd9xgxzvm310s8";
|
2019-07-26 16:15:36 +00:00
|
|
|
};
|
|
|
|
|
2020-05-11 18:43:40 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "starlette ==0.13.2" "starlette"
|
|
|
|
'';
|
|
|
|
|
2019-07-26 16:15:36 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
uvicorn
|
|
|
|
starlette
|
|
|
|
pydantic
|
|
|
|
];
|
|
|
|
|
2019-12-29 18:08:35 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
pytestcov
|
|
|
|
pyjwt
|
|
|
|
passlib
|
|
|
|
aiosqlite
|
2020-02-28 16:36:20 +00:00
|
|
|
peewee
|
2020-04-07 18:02:51 +00:00
|
|
|
flask
|
2019-12-29 18:08:35 +00:00
|
|
|
];
|
|
|
|
|
2020-04-07 18:02:51 +00:00
|
|
|
# test_default_response_class.py: requires orjson, which requires rust toolchain
|
|
|
|
# test_custom_response/test_tutorial001b.py: requires orjson
|
|
|
|
# tests/test_tutorial/test_sql_databases/test_testing_databases.py: just broken, don't know why
|
2019-07-26 16:15:36 +00:00
|
|
|
checkPhase = ''
|
2020-04-07 18:02:51 +00:00
|
|
|
pytest --ignore=tests/test_default_response_class.py \
|
|
|
|
--ignore=tests/test_tutorial/test_custom_response/test_tutorial001b.py \
|
|
|
|
--ignore=tests/test_tutorial/test_sql_databases/test_testing_databases.py
|
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 ];
|
|
|
|
};
|
|
|
|
}
|