Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.5 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, uvicorn 5, starlette 6, pydantic 7, isPy3k 8, pytest 9, pytestcov 10, pyjwt 11, passlib 12, aiosqlite 13, peewee 14, flask 15}: 16 17buildPythonPackage rec { 18 pname = "fastapi"; 19 version = "0.55.1"; 20 format = "flit"; 21 disabled = !isPy3k; 22 23 src = fetchFromGitHub { 24 owner = "tiangolo"; 25 repo = "fastapi"; 26 rev = version; 27 sha256 = "1515nhwari48v0angyl5z3cfpvwn4al2nvqh0cjd9xgxzvm310s8"; 28 }; 29 30 postPatch = '' 31 substituteInPlace pyproject.toml \ 32 --replace "starlette ==0.13.2" "starlette" 33 ''; 34 35 propagatedBuildInputs = [ 36 uvicorn 37 starlette 38 pydantic 39 ]; 40 41 checkInputs = [ 42 pytest 43 pytestcov 44 pyjwt 45 passlib 46 aiosqlite 47 peewee 48 flask 49 ]; 50 51 # test_default_response_class.py: requires orjson, which requires rust toolchain 52 # test_custom_response/test_tutorial001b.py: requires orjson 53 # tests/test_tutorial/test_sql_databases/test_testing_databases.py: just broken, don't know why 54 checkPhase = '' 55 pytest --ignore=tests/test_default_response_class.py \ 56 --ignore=tests/test_tutorial/test_custom_response/test_tutorial001b.py \ 57 --ignore=tests/test_tutorial/test_sql_databases/test_testing_databases.py 58 ''; 59 60 meta = with lib; { 61 homepage = "https://github.com/tiangolo/fastapi"; 62 description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"; 63 license = licenses.mit; 64 maintainers = with maintainers; [ wd15 ]; 65 }; 66}