nixpkgs-suyu/pkgs/development/python-modules/fastapi/default.nix

62 lines
1.3 KiB
Nix
Raw Normal View History

2019-07-26 18:15:36 +02:00
{ lib
, buildPythonPackage
, fetchFromGitHub
2019-07-26 18:15:36 +02:00
, uvicorn
, starlette
, pydantic
, isPy3k
, pytest
, pytestcov
, pyjwt
, passlib
, aiosqlite
, peewee
, flask
2019-07-26 18:15:36 +02:00
}:
buildPythonPackage rec {
pname = "fastapi";
version = "0.54.0";
format = "flit";
2019-07-26 18:15:36 +02:00
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "tiangolo";
repo = "fastapi";
rev = version;
sha256 = "17bicrpr801z71wrn9iimvh7qk6iwyxvr89ialf0s2rxxa2s0yb5";
2019-07-26 18:15:36 +02:00
};
propagatedBuildInputs = [
uvicorn
starlette
pydantic
];
checkInputs = [
pytest
pytestcov
pyjwt
passlib
aiosqlite
peewee
flask
];
# 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 18:15:36 +02:00
checkPhase = ''
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 18:15:36 +02: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 ];
};
}