2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-01-09 10:05:03 +00:00
|
|
|
, isPy27
|
2020-04-24 23:36:52 +00:00
|
|
|
, aiofiles
|
|
|
|
, graphene
|
|
|
|
, itsdangerous
|
|
|
|
, jinja2
|
2021-01-09 10:05:03 +00:00
|
|
|
, python-multipart
|
2020-04-24 23:36:52 +00:00
|
|
|
, pyyaml
|
|
|
|
, requests
|
|
|
|
, aiosqlite
|
2021-01-09 10:05:03 +00:00
|
|
|
, databases
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-asyncio
|
|
|
|
, typing-extensions
|
|
|
|
, ApplicationServices
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "starlette";
|
2021-03-23 19:22:30 +00:00
|
|
|
version = "0.14.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-03-23 19:22:30 +00:00
|
|
|
sha256 = "0fz28czvwiww693ig9vwdja59xxs7m0yp1df32ms1hzr99666bia";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
postPatch = ''
|
|
|
|
# remove coverage arguments to pytest
|
|
|
|
sed -i '/--cov/d' setup.cfg
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiofiles
|
|
|
|
graphene
|
|
|
|
itsdangerous
|
|
|
|
jinja2
|
2021-01-09 10:05:03 +00:00
|
|
|
python-multipart
|
2020-04-24 23:36:52 +00:00
|
|
|
pyyaml
|
|
|
|
requests
|
2021-01-09 10:05:03 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin [ ApplicationServices ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aiosqlite
|
2021-01-09 10:05:03 +00:00
|
|
|
databases
|
2021-02-13 14:23:35 +00:00
|
|
|
pytest-asyncio
|
2021-01-09 10:05:03 +00:00
|
|
|
pytestCheckHook
|
|
|
|
typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
# fails to import graphql, but integrated graphql support is about to
|
|
|
|
# be removed in 0.15, see https://github.com/encode/starlette/pull/1135.
|
2021-03-09 03:18:52 +00:00
|
|
|
disabledTestPaths = [ "tests/test_graphql.py" ];
|
2021-03-23 19:22:30 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
pythonImportsCheck = [ "starlette" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.starlette.io/";
|
|
|
|
description = "The little ASGI framework that shines";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ wd15 ];
|
|
|
|
};
|
|
|
|
}
|