2019-07-25 23:02:18 +02:00
|
|
|
{ lib
|
2019-08-20 20:52:39 +02:00
|
|
|
, stdenv
|
2019-07-25 23:02:18 +02:00
|
|
|
, buildPythonPackage
|
2020-02-28 17:17:48 +01:00
|
|
|
, fetchFromGitHub
|
2019-07-25 23:02:18 +02:00
|
|
|
, aiofiles
|
|
|
|
, graphene
|
|
|
|
, itsdangerous
|
|
|
|
, jinja2
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
|
|
|
, ujson
|
2019-12-29 19:10:17 +01:00
|
|
|
, python-multipart
|
2019-07-25 23:02:18 +02:00
|
|
|
, pytest
|
|
|
|
, uvicorn
|
|
|
|
, isPy27
|
2019-08-20 20:52:39 +02:00
|
|
|
, darwin
|
2019-12-29 19:10:17 +01:00
|
|
|
, databases
|
|
|
|
, aiosqlite
|
2019-07-25 23:02:18 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "starlette";
|
2020-02-28 17:17:48 +01:00
|
|
|
|
|
|
|
# This is not the latest version of Starlette, however, later
|
|
|
|
# versions of Starlette break FastAPI due to
|
|
|
|
# https://github.com/tiangolo/fastapi/issues/683. Please update when
|
|
|
|
# possible. FastAPI is currently Starlette's only dependent.
|
|
|
|
|
2020-05-09 19:19:04 +02:00
|
|
|
version = "0.13.4";
|
2019-07-25 23:02:18 +02:00
|
|
|
disabled = isPy27;
|
|
|
|
|
2020-02-28 17:17:48 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-05-09 19:19:04 +02:00
|
|
|
sha256 = "1rk20rj62iigkkikb80bmalriyg1j3g28s25l8z2gijagv1v5c7l";
|
2019-07-25 23:02:18 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiofiles
|
|
|
|
graphene
|
|
|
|
itsdangerous
|
|
|
|
jinja2
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
ujson
|
|
|
|
uvicorn
|
2019-12-29 19:10:17 +01:00
|
|
|
python-multipart
|
|
|
|
databases
|
2019-08-20 20:52:39 +02:00
|
|
|
] ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices ];
|
2019-07-25 23:02:18 +02:00
|
|
|
|
2019-12-29 19:10:17 +01:00
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
aiosqlite
|
|
|
|
];
|
|
|
|
|
2019-07-25 23:02:18 +02:00
|
|
|
checkPhase = ''
|
2019-12-29 19:10:17 +01:00
|
|
|
pytest --ignore=tests/test_graphql.py
|
2019-07-25 23:02:18 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-07 09:21:33 +02:00
|
|
|
homepage = "https://www.starlette.io/";
|
2019-07-25 23:02:18 +02:00
|
|
|
description = "The little ASGI framework that shines";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ wd15 ];
|
|
|
|
};
|
|
|
|
}
|