2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pydantic
|
2021-01-09 10:05:03 +00:00
|
|
|
, starlette
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-asyncio
|
2020-04-24 23:36:52 +00:00
|
|
|
, aiosqlite
|
2021-01-09 10:05:03 +00:00
|
|
|
, databases
|
2020-04-24 23:36:52 +00:00
|
|
|
, flask
|
2021-01-09 10:05:03 +00:00
|
|
|
, httpx
|
|
|
|
, passlib
|
|
|
|
, peewee
|
|
|
|
, python-jose
|
|
|
|
, sqlalchemy
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fastapi";
|
2021-01-09 10:05:03 +00:00
|
|
|
version = "0.63.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
format = "flit";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tiangolo";
|
|
|
|
repo = "fastapi";
|
|
|
|
rev = version;
|
2021-01-09 10:05:03 +00:00
|
|
|
sha256 = "0l3imrcs42pqf9d6k8c1q15k5sqcnapl5zk71xl52mrxhz49lgpi";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2021-01-09 10:05:03 +00:00
|
|
|
--replace "starlette ==0.13.6" "starlette"
|
2020-05-15 21:57:56 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
starlette
|
|
|
|
pydantic
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aiosqlite
|
2021-01-09 10:05:03 +00:00
|
|
|
databases
|
2020-04-24 23:36:52 +00:00
|
|
|
flask
|
2021-01-09 10:05:03 +00:00
|
|
|
httpx
|
|
|
|
passlib
|
|
|
|
peewee
|
|
|
|
python-jose
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-asyncio
|
|
|
|
sqlalchemy
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
# disabled tests require orjson which requires rust nightly
|
|
|
|
pytestFlagsArray = [ "--ignore=tests/test_default_response_class.py" ];
|
|
|
|
disabledTests = [ "test_get_custom_response" ];
|
2020-04-24 23:36:52 +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 ];
|
|
|
|
};
|
|
|
|
}
|