nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 81 lines 1.5 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, aiofiles 6, anyio 7, contextlib2 8, itsdangerous 9, jinja2 10, python-multipart 11, pyyaml 12, requests 13, aiosqlite 14, databases 15, pytestCheckHook 16, pythonOlder 17, trio 18, typing-extensions 19, ApplicationServices 20}: 21 22buildPythonPackage rec { 23 pname = "starlette"; 24 version = "0.19.0"; 25 format = "setuptools"; 26 27 disabled = pythonOlder "3.6"; 28 29 src = fetchFromGitHub { 30 owner = "encode"; 31 repo = pname; 32 rev = version; 33 sha256 = "sha256-gjRTMzoQ8pqxjIusRwRXGs72VYo6xsp2DSUxmEr9KxU="; 34 }; 35 36 postPatch = '' 37 # remove coverage arguments to pytest 38 sed -i '/--cov/d' setup.cfg 39 ''; 40 41 propagatedBuildInputs = [ 42 aiofiles 43 anyio 44 itsdangerous 45 jinja2 46 python-multipart 47 pyyaml 48 requests 49 ] ++ lib.optionals (pythonOlder "3.8") [ 50 typing-extensions 51 ] ++ lib.optionals (pythonOlder "3.7") [ 52 contextlib2 53 ] ++ lib.optional stdenv.isDarwin [ 54 ApplicationServices 55 ]; 56 57 checkInputs = [ 58 aiosqlite 59 databases 60 pytestCheckHook 61 trio 62 typing-extensions 63 ]; 64 65 disabledTests = [ 66 # asserts fail due to inclusion of br in Accept-Encoding 67 "test_websocket_headers" 68 "test_request_headers" 69 ]; 70 71 pythonImportsCheck = [ 72 "starlette" 73 ]; 74 75 meta = with lib; { 76 homepage = "https://www.starlette.io/"; 77 description = "The little ASGI framework that shines"; 78 license = licenses.bsd3; 79 maintainers = with maintainers; [ wd15 ]; 80 }; 81}