diff --git a/pkgs/development/python-modules/authcaptureproxy/default.nix b/pkgs/development/python-modules/authcaptureproxy/default.nix
index 0f1f6d046463..a780ae59be70 100644
--- a/pkgs/development/python-modules/authcaptureproxy/default.nix
+++ b/pkgs/development/python-modules/authcaptureproxy/default.nix
@@ -27,9 +27,10 @@ buildPythonPackage rec {
 
   postPatch = ''
     # https://github.com/alandtse/auth_capture_proxy/issues/14
-    substituteInPlace pyproject.toml --replace \
-      "poetry.masonry.api" \
-      "poetry.core.masonry.api"
+    # https://github.com/alandtse/auth_capture_proxy/issues/15
+    substituteInPlace pyproject.toml \
+       --replace "poetry.masonry.api" "poetry.core.masonry.api" \
+       --replace 'importlib-metadata = "^3.4.0"' 'importlib-metadata = "*"'
   '';
 
   nativeBuildInputs = [