nix-shell
regression for shell.nix
symlinks to other directories
#11630
Labels
nix-shell
regression for shell.nix
symlinks to other directories
#11630
Describe the bug
I've got a project set up where I have a top-level
shell.nix
symlink, which points to./subdirectory/shell.nix
.When I upgraded to the most recent version of nix (
2.24.7
) suddenly all expressions in./subdirectory/shell.nix
with relative files (such asimport ./foo.nix
) try to look for these files not insubdirectory
but in the top-level directory instead, which then results in aerror: path '/home/user/toplevel/foo.nix' does not exist
.Minimal example
I uploaded a reproducer for the issue here: https://github.com/knedlsepp/nix-11630
Additional context
I bisected the issue and the change of behavior was introduced with commit cfe3ee3, part of #11057.
Workaround
Using
nix-shell --option nix-shell-always-looks-for-shell-nix false
restores the previous behavior. (However the option's name doesn't suggest that this is intended to have an influence)The text was updated successfully, but these errors were encountered: