linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / python-modules / uvicorn / default.nix
blob36e8b12929e0e2402f00a7ac7113db6c1c206e3a
1 { stdenv
2 , lib
3 , buildPythonPackage
4 , fetchFromGitHub
5 , click
6 , h11
7 , httptools
8 , uvloop
9 , websockets
10 , wsproto
11 , pytestCheckHook
12 , pytest-mock
13 , pyyaml
14 , requests
15 , trustme
16 , typing-extensions
17 , isPy27
18 , pythonOlder
21 buildPythonPackage rec {
22   pname = "uvicorn";
23   version = "0.13.2";
24   disabled = isPy27;
26   src = fetchFromGitHub {
27     owner = "encode";
28     repo = pname;
29     rev = version;
30     sha256 = "04zgmp9z46k72ay6cz7plga6d3w3a6x41anabm7ramp7jdqf6na9";
31   };
33   propagatedBuildInputs = [
34     click
35     h11
36     httptools
37     uvloop
38     websockets
39     wsproto
40   ] ++ lib.optionals (pythonOlder "3.8") [
41     typing-extensions
42   ];
44   checkInputs = [
45     pytestCheckHook
46     pytest-mock
47     pyyaml
48     requests
49     trustme
50   ];
52   doCheck = !stdenv.isDarwin;
54   __darwinAllowLocalNetworking = true;
56   pytestFlagsArray = [
57     # watchgod required the watchgod package, which isn't available in nixpkgs
58     "--ignore=tests/supervisors/test_reload.py"
59   ];
61   disabledTests = [
62     "test_supported_upgrade_request"
63     "test_invalid_upgrade"
64   ];
66   meta = with lib; {
67     homepage = "https://www.uvicorn.org/";
68     description = "The lightning-fast ASGI server";
69     license = licenses.bsd3;
70     maintainers = with maintainers; [ wd15 ];
71   };