diff --git a/pkgs/development/python-modules/magic-wormhole-transit-relay/default.nix b/pkgs/development/python-modules/magic-wormhole-transit-relay/default.nix index 761e7deff0e9..3c3e46f92c0e 100644 --- a/pkgs/development/python-modules/magic-wormhole-transit-relay/default.nix +++ b/pkgs/development/python-modules/magic-wormhole-transit-relay/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchPypi, + fetchpatch, setuptools, autobahn, twisted, @@ -19,6 +20,15 @@ buildPythonPackage rec { hash = "sha256-kS2DXaIbESZsdxEdybXlgAJj/AuY8KF5liJn30GBnow="; }; + patches = [ + # TODO: drop when updating beyond version 0.4.0 + (fetchpatch { + name = "stock-Twisted-testing-reactor-seems-to-work.patch"; + url = "https://github.com/magic-wormhole/magic-wormhole-transit-relay/commit/3abb80fd5e55bd0ba8ee66278ccf76be5f904622.patch"; + hash = "sha256-qMaJ58kPWvEfnSZiFzxO6GlkBiyVMsgGDEa1deITZco="; + }) + ]; + postPatch = '' # Passing the environment to twistd is necessary to preserve Python's site path. substituteInPlace src/wormhole_transit_relay/test/test_backpressure.py --replace-fail \