Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix-shell regression for shell.nix symlinks to other directories #11630

Open
knedlsepp opened this issue Oct 3, 2024 · 0 comments
Open

nix-shell regression for shell.nix symlinks to other directories #11630

knedlsepp opened this issue Oct 3, 2024 · 0 comments
Labels

Comments

@knedlsepp
Copy link
Member

knedlsepp commented Oct 3, 2024

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 as import ./foo.nix) try to look for these files not in subdirectory but in the top-level directory instead, which then results in a error: 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)

@knedlsepp knedlsepp added the bug label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant