Overlay to disable failing test in python dependency

Following the example I tried to disable failing tests in an unmaintained dependency.

My overlay file, which successfully provides other overlays into my config, includes:

 python3 = super.python3.override {
    packageOverrides = python-self: python-super: {
      dbus-next = python-super.dbus-next.overrideAttrs (oldAttrs: {
        doCheck=false;
      });
    };
  };

However tests in that package still fail when I try to build NixOS.

====== 1 failed, 72 passed, 7 skipped, 2 deselected, 6 warnings in 0.56s =======
error: builder for '/nix/store/d7597bjwk722xrgvwba59vjvwpbbsj7q-python3.12-dbus-next-0.2.3.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/y6dyphycg7gaj5j2nl92h8j3lzymgml5-python3.12-qtile-0.29.0.drv' failed to build

How can I resolve this? Thanks.

I’ve had to override this package in the past when I was still using it, and I had almost the same overlay, however instead of overrideAttrs I used overridePythonAttrs. Maybe that does the trick for you too?