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
|
|
|
|
, fetchPypi
|
|
|
|
, aiofiles
|
|
|
|
, graphene
|
|
|
|
, itsdangerous
|
|
|
|
, jinja2
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
|
|
|
, ujson
|
|
|
|
, pytest
|
|
|
|
, python
|
|
|
|
, uvicorn
|
|
|
|
, isPy27
|
2019-08-20 19:52:39 +01:00
|
|
|
, darwin
|
2019-07-25 22:02:18 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "starlette";
|
2019-11-11 11:13:41 +00:00
|
|
|
version = "0.12.13";
|
2019-07-25 22:02:18 +01:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-11-11 11:13:41 +00:00
|
|
|
sha256 = "9597bc28e3c4659107c1c4a45ec32dc45e947d78fe56230222be673b2c36454a";
|
2019-07-25 22:02:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiofiles
|
|
|
|
graphene
|
|
|
|
itsdangerous
|
|
|
|
jinja2
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
ujson
|
|
|
|
uvicorn
|
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
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -c """
|
|
|
|
from starlette.applications import Starlette
|
|
|
|
app = Starlette(debug=True)
|
|
|
|
"""
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = https://www.starlette.io/;
|
|
|
|
description = "The little ASGI framework that shines";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ wd15 ];
|
|
|
|
};
|
|
|
|
}
|