My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nomicon/pkgs/development/python-modules/fastapi/default.nix

64 lines
1.2 KiB

{ lib
, buildPythonPackage
, fetchFromGitHub
, pydantic
, starlette
, pytestCheckHook
, pytest-asyncio
, aiosqlite
, databases
, flask
, httpx
, passlib
, peewee
, python-jose
, sqlalchemy
}:
buildPythonPackage rec {
pname = "fastapi";
version = "0.65.2";
format = "flit";
src = fetchFromGitHub {
owner = "tiangolo";
repo = "fastapi";
rev = version;
sha256 = "032srvbfdy02m1b664x67lkdcx6b2bd4c9a9cb176lscjk213240";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "starlette ==" "starlette >="
'';
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" ];
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 ];
};
}