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.
|
|
|
|
|
|
|
|
version = "0.12.9";
|
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;
|
|
|
|
sha256 = "0w44s8ynzy8w8dgm755c8jina9i4dd87vqkcv7jc1kwkg384w9i5";
|
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; {
|
|
|
|
homepage = https://www.starlette.io/;
|
|
|
|
description = "The little ASGI framework that shines";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ wd15 ];
|
|
|
|
};
|
|
|
|
}
|