How to debug a derivation that can't be traced

Hello!

As in the title; something in my package is causing the python package hyrule to error out with:

error: hyrule should use `buildPythonPackage` or `toPythonModule` if it is to be part of the Python packages set.`

The nixpkgs version I’m getting it from is, in fact, using buildPythonPackage, and I’m not using any overlays for this particular package. However, using it directly from inputs.nixpkgs, as inputs.nixpkgs.legacyPackages.${stdenv.targetPlatform.system}.python310.pkgs.hyrule, seems to work.

The problem is that every time I try to inspect the package, the error above occurs, not even allowing me to trace the attribute names of the derivation, for example.

Any help in solving this would be greatly appreciated!