diff --git a/pkgs/development/python-modules/python-engineio/default.nix b/pkgs/development/python-modules/python-engineio/default.nix index 0337029e248e..f1a079d5896e 100644 --- a/pkgs/development/python-modules/python-engineio/default.nix +++ b/pkgs/development/python-modules/python-engineio/default.nix @@ -4,6 +4,7 @@ , buildPythonPackage , eventlet , fetchFromGitHub +, fetchpatch , iana-etc , libredirect , mock @@ -24,10 +25,19 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "miguelgrinberg"; repo = "python-engineio"; - rev = "v${version}"; + rev = "refs/tags/v${version}"; hash = "sha256-fymO9WqkYaRsHKCJHQJpySHqZor2t8BfVrfYUfYoJno="; }; + patches = [ + # Address Python 3.11 mocking issue, https://github.com/miguelgrinberg/python-engineio/issues/279 + (fetchpatch { + name = "mocking-issue-py311.patch"; + url = "https://github.com/miguelgrinberg/python-engineio/commit/ac3911356fbe933afa7c11d56141f0e228c01528.patch"; + hash = "sha256-LNMhjX8kqOI3y8XugCHxCPEC6lF83NROfIczXWiLuqY="; + }) + ]; + nativeCheckInputs = [ aiohttp eventlet