Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 67 lines 1.3 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, aiofiles 6, graphene 7, itsdangerous 8, jinja2 9, pyyaml 10, requests 11, ujson 12, python-multipart 13, pytest 14, uvicorn 15, isPy27 16, darwin 17, databases 18, aiosqlite 19}: 20 21buildPythonPackage rec { 22 pname = "starlette"; 23 24 # This is not the latest version of Starlette, however, later 25 # versions of Starlette break FastAPI due to 26 # https://github.com/tiangolo/fastapi/issues/683. Please update when 27 # possible. FastAPI is currently Starlette's only dependent. 28 29 version = "0.12.9"; 30 disabled = isPy27; 31 32 src = fetchFromGitHub { 33 owner = "encode"; 34 repo = pname; 35 rev = version; 36 sha256 = "0w44s8ynzy8w8dgm755c8jina9i4dd87vqkcv7jc1kwkg384w9i5"; 37 }; 38 39 propagatedBuildInputs = [ 40 aiofiles 41 graphene 42 itsdangerous 43 jinja2 44 pyyaml 45 requests 46 ujson 47 uvicorn 48 python-multipart 49 databases 50 ] ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices ]; 51 52 checkInputs = [ 53 pytest 54 aiosqlite 55 ]; 56 57 checkPhase = '' 58 pytest --ignore=tests/test_graphql.py 59 ''; 60 61 meta = with lib; { 62 homepage = https://www.starlette.io/; 63 description = "The little ASGI framework that shines"; 64 license = licenses.bsd3; 65 maintainers = with maintainers; [ wd15 ]; 66 }; 67}