diff --git a/pkgs/development/python-modules/uvicorn/default.nix b/pkgs/development/python-modules/uvicorn/default.nix index 1bf0d1c54f06..9f7efef1e843 100644 --- a/pkgs/development/python-modules/uvicorn/default.nix +++ b/pkgs/development/python-modules/uvicorn/default.nix @@ -1,23 +1,27 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , click , h11 , httptools , uvloop , websockets , wsproto +, pytest +, requests , isPy27 }: buildPythonPackage rec { pname = "uvicorn"; - version = "0.8.4"; + version = "0.9.0"; disabled = isPy27; - src = fetchPypi { - inherit pname version; - sha256 = "1l8rfm30inx9pma893i7sby9h7y910k58841zqaajksn563b882k"; + src = fetchFromGitHub { + owner = "encode"; + repo = pname; + rev = version; + sha256 = "0z4h04mbkzqgpk698bac6f50jxkf02ils6khzl7zbw7yvi6gkkc8"; }; propagatedBuildInputs = [ @@ -29,11 +33,15 @@ buildPythonPackage rec { wsproto ]; - checkPhase = '' - $out/bin/uvicorn --help + postPatch = '' + substituteInPlace setup.py \ + --replace "h11==0.8.*" "h11" ''; - patches = [ ./setup.patch ]; + checkInputs = [ pytest requests ]; + checkPhase = '' + pytest + ''; meta = with lib; { homepage = https://www.uvicorn.org/; diff --git a/pkgs/development/python-modules/uvicorn/setup.patch b/pkgs/development/python-modules/uvicorn/setup.patch deleted file mode 100644 index f1d974b42d93..000000000000 --- a/pkgs/development/python-modules/uvicorn/setup.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/setup.py b/setup.py -index 802cda4..561abf4 100755 ---- a/setup.py -+++ b/setup.py -@@ -42,7 +42,7 @@ env_marker = ( - - requirements = [ - "click==7.*", -- "h11==0.8.*", -+ "h11", - "websockets==7.*", - "httptools==0.0.13 ;" + env_marker, - "uvloop==0.12.* ;" + env_marker,