The condition does not match the comment, and therefore not the original
intention. It currently returns early in *any* type of Nix shell, not
just pure ones, including 'nix develop'.
Besides being unnecessary, this check prevents Nix shells from
functioning properly. For instance, it causes the initialization of the
Zsh fpath to be skipped, which is critical. The fact that the user is
unable to opt out of this behaviour makes this an ever bigger problem
since /etc/zshenv is being loaded unconditionally by Zsh.
For reference, NixOS does not perform such check, and apparently never
did.
This should enable `nix run` to work under shells like fish and zsh,
as well as making child shells not needlessly reset any environment
that should be inherited.
Implementation adapted from NixOS.