nixpkgs/pkgs/development/python-modules/uvicorn/default.nix

73 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv
, lib
2019-07-25 21:33:06 +01:00
, buildPythonPackage
, fetchFromGitHub
2019-07-25 21:33:06 +01:00
, click
, h11
, httptools
, uvloop
, websockets
, wsproto
, pytestCheckHook
, pytest-mock
, pyyaml
, requests
, trustme
, typing-extensions
2019-07-25 21:33:06 +01:00
, isPy27
, pythonOlder
2019-07-25 21:33:06 +01:00
}:
buildPythonPackage rec {
pname = "uvicorn";
version = "0.13.2";
2019-07-25 21:33:06 +01:00
disabled = isPy27;
src = fetchFromGitHub {
owner = "encode";
repo = pname;
rev = version;
sha256 = "04zgmp9z46k72ay6cz7plga6d3w3a6x41anabm7ramp7jdqf6na9";
2019-07-25 21:33:06 +01:00
};
propagatedBuildInputs = [
click
h11
httptools
uvloop
websockets
wsproto
] ++ lib.optionals (pythonOlder "3.8") [
typing-extensions
2019-07-25 21:33:06 +01:00
];
checkInputs = [
pytestCheckHook
pytest-mock
pyyaml
requests
trustme
];
doCheck = !stdenv.isDarwin;
__darwinAllowLocalNetworking = true;
pytestFlagsArray = [
# watchgod required the watchgod package, which isn't available in nixpkgs
"--ignore=tests/supervisors/test_reload.py"
];
disabledTests = [
"test_supported_upgrade_request"
"test_invalid_upgrade"
];
meta = with lib; {
homepage = "https://www.uvicorn.org/";
2019-07-25 21:33:06 +01:00
description = "The lightning-fast ASGI server";
license = licenses.bsd3;
maintainers = with maintainers; [ wd15 ];
};
}