Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 58 lines 1.0 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, click 5, h11 6, httptools 7, uvloop 8, websockets 9, wsproto 10, pytest 11, requests 12, isPy27 13}: 14 15buildPythonPackage rec { 16 pname = "uvicorn"; 17 version = "0.11.2"; 18 disabled = isPy27; 19 20 src = fetchFromGitHub { 21 owner = "encode"; 22 repo = pname; 23 rev = version; 24 sha256 = "145c569j4511zw3wglyv9qgd7g1757ypi2blcckpcmahqw11l5p2"; 25 }; 26 27 propagatedBuildInputs = [ 28 click 29 h11 30 httptools 31 uvloop 32 websockets 33 wsproto 34 ]; 35 36 postPatch = '' 37 substituteInPlace setup.py \ 38 --replace "h11==0.8.*" "h11" 39 ''; 40 41 checkInputs = [ pytest requests ]; 42 checkPhase = '' 43 pytest 44 ''; 45 46 # LICENCE.md gets propagated without this, causing collisions 47 # see https://github.com/encode/uvicorn/issues/392 48 postInstall = '' 49 rm $out/LICENSE.md 50 ''; 51 52 meta = with lib; { 53 homepage = https://www.uvicorn.org/; 54 description = "The lightning-fast ASGI server"; 55 license = licenses.bsd3; 56 maintainers = with maintainers; [ wd15 ]; 57 }; 58}