2019-07-25 22:02:18 +01:00
|
|
|
{ lib
|
2019-08-20 19:52:39 +01:00
|
|
|
, stdenv
|
2019-07-25 22:02:18 +01:00
|
|
|
, buildPythonPackage
|
2020-02-28 16:17:48 +00:00
|
|
|
, fetchFromGitHub
|
2019-07-25 22:02:18 +01:00
|
|
|
, aiofiles
|
|
|
|
, graphene
|
|
|
|
, itsdangerous
|
|
|
|
, jinja2
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
|
|
|
, ujson
|
2019-12-29 18:10:17 +00:00
|
|
|
, python-multipart
|
2019-07-25 22:02:18 +01:00
|
|
|
, pytest
|
|
|
|
, uvicorn
|
|
|
|
, isPy27
|
2019-08-20 19:52:39 +01:00
|
|
|
, darwin
|
2019-12-29 18:10:17 +00:00
|
|
|
, databases
|
|
|
|
, aiosqlite
|
2019-07-25 22:02:18 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "starlette";
|
2020-02-28 16:17:48 +00: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-07-26 16:57:59 +01:00
|
|
|
version = "0.13.6";
|
2019-07-25 22:02:18 +01:00
|
|
|
disabled = isPy27;
|
|
|
|
|
2020-02-28 16:17:48 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-07-26 16:57:59 +01:00
|
|
|
sha256 = "08d1d4qdwhi1xxag4am5ijingdyn0mbyqajs9ql5shxnybyjv321";
|
2019-07-25 22:02:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiofiles
|
|
|
|
graphene
|
|
|
|
itsdangerous
|
|
|
|
jinja2
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
ujson
|
|
|
|
uvicorn
|
2019-12-29 18:10:17 +00:00
|
|
|
python-multipart
|
|
|
|
databases
|
2019-08-20 19:52:39 +01:00
|
|
|
] ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices ];
|
2019-07-25 22:02:18 +01:00
|
|
|
|
2019-12-29 18:10:17 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
aiosqlite
|
|
|
|
];
|
|
|
|
|
2019-07-25 22:02:18 +01:00
|
|
|
checkPhase = ''
|
2019-12-29 18:10:17 +00:00
|
|
|
pytest --ignore=tests/test_graphql.py
|
2019-07-25 22:02:18 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-07 08:21:33 +01:00
|
|
|
homepage = "https://www.starlette.io/";
|
2019-07-25 22:02:18 +01:00
|
|
|
description = "The little ASGI framework that shines";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ wd15 ];
|
|
|
|
};
|
|
|
|
}
|