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

64 lines
1.2 KiB
Nix
Raw Normal View History

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