diff --git a/pkgs/development/python-modules/sanic-testing/default.nix b/pkgs/development/python-modules/sanic-testing/default.nix index b59781e5c459..5e7deb51362e 100644 --- a/pkgs/development/python-modules/sanic-testing/default.nix +++ b/pkgs/development/python-modules/sanic-testing/default.nix @@ -19,6 +19,13 @@ buildPythonPackage rec { sha256 = "1pf619cd3dckn3d8gh18vbn7dflvb0mzpf6frx4y950x2j3rdplk"; }; + postPatch = '' + # https://github.com/sanic-org/sanic-testing/issues/19 + substituteInPlace setup.py \ + --replace '"websockets==8.1",' '"websockets>=9.1",' \ + --replace "httpx==0.18.*" "httpx" + ''; + propagatedBuildInputs = [ httpx sanic @@ -30,12 +37,6 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - # https://github.com/sanic-org/sanic-testing/issues/19 - substituteInPlace setup.py \ - --replace '"websockets==8.1",' '"websockets>=9.1",' - ''; - # `sanic` is explicitly set to null when building `sanic` itself # to prevent infinite recursion. In that case we skip running # the package at all.