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
|
|
|
|
2020-08-27 23:27:15 +01:00
|
|
|
version = "0.13.8";
|
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-08-27 23:27:15 +01:00
|
|
|
sha256 = "11i0yd8cqwscixajl734g11vf8pghki11c81chzfh8ifmj6mf9jk";
|
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
|
|
|
'';
|
2020-08-27 23:27:15 +01:00
|
|
|
pythonImportsCheck = [ "starlette" ];
|
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 ];
|
|
|
|
};
|
|
|
|
}
|