Description
Describe the bug
I noticed recently that my NixOS config was getting a new error about the modules I have built with nested flake references were not building because the path to the module source was incorrect.
Steps To Reproduce
Create a directory with multiple nested flakes. Here is a rough directory structure as an example:
example_project/
├─ module_a/
│ ├─ module_b/
│ │ ├─ flake.nix
│ ├─ flake.nix
├─ flake.nix
Now assume that example_project/flake.nix
resembles this:
{
inputs.module_a.url = "./module_a";
...
}
example_project/module_a/flake.nix
resembles this:
{
inputs.module_b.url = "./module_b";
...
}
Expected behavior
It is expected that the reference to module_b
's source in the nix store would be similar to /nix/store/<hash>-source/module_a/module_b
and the build process would be successful.
Actual behavior
The file path attempted for loading module_b
has an additional reference to module_a
's sub directory, which is similar to /nix/store/<hash>-source/module_a/module_a/module_b
.
Metadata
nix-env (Nix) 2.28.3
Additional context
I was able to use nix-env (Nix) 2.27.1
to successfully build the modules again.
I am fairly certain the source of this issue was caused by this update: 2109a5a
Checklist
- checked latest Nix manual (source)
- checked open bug issues and pull requests for possible duplicates
Add 👍 to issues you find important.