You can find out what is causing it by setting NIX_ABORT_ON_WARN=true environment variable and --show-trace. See the docs for lib.warn.
If you are using flakes, you will need to disable pure evaluation for the environment variable to be available in Nix. Something like the following should work: