What is cycle detected and how to debug afetr build phase

I try to build omnetpp by nix. If I split outputs, the nix will complain cycle detcted. If I don’t split it, the build is successed.

The nix expression can be found here with single output and here with multiple outputs(this commit may have some other problem in fixupPhase). I try to use docker image for this software, but I also want to know more about this question.

Is there a way to debug this?

Or more commonly, how to debug after build phase, nix-shell doesn’t have access to /nix/store path, so install phase and the following phase cannot be done in nix-shell. In other word, can nix don’t remove the build phase results during nix-build?

For what it’s worth, I tried to package omnetpp and sumo a while ago. I think it worked, but I ended up not needing it so I never polished it for upstream. Not entirely sure what the status is though. Maybe it helps:

https://github.com/timokau/nixpkgs/commit/4ea8e691a97396b39d874d2c0e1301c9cb9716ff

Regarding your error message: nix has detected that both outputs refer to each other, resulting in a cyclic dependency. Since either output would pull in the other one, there is no point in splitting them.