-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Flakes: "follows" in locked input works as if it's in the top level. #5093
Copy link
Copy link
Closed
Labels
Description
Describe the bug
"follows" on any non-top-level locked input work as if they follow top level flake with the same name.
Steps To Reproduce
Create some test directory with full path FULLPATH and write following files:
a/flake.nix
{
inputs = {
c.url = "FULLPATH/c";
};
outputs = _: {};
}
b/flake.nix
{
inputs = {
d.url = "FULLPATH/d";
};
outputs = _: {};
}
c/flake.nix
{
inputs = {
d.url = "FULLPATH/d";
b.url = "FULLPATH/b";
b.inputs.d.follows = "d";
};
outputs = _: {};
}
d/flake.nix
{
inputs = {};
outputs = _: {};
}
Then lock c and try locking a.
cd c; nix flake lock
cd a; nix flake lockLocking a fails with error: input 'c/b/d' follows a non-existent input 'd'
If you remove flake.lock from c, you'll get correct behavior.
Expected behavior
Correctly locked flake, with lockfile in "c" being used for follows value.
nix-env --version output
nix-env (Nix) 2.4pre20210707_02dd6bb
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Fields
Give feedbackNo fields configured for issues without a type.