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