diff options
author | Alexander Bantyev <balsoft@balsoft.ru> | 2022-02-02 21:41:45 +0300 |
---|---|---|
committer | Alexander Bantyev <balsoft@balsoft.ru> | 2022-02-02 21:41:45 +0300 |
commit | 169ea0b83fe09b473766e22337dfd488c96ff2be (patch) | |
tree | 42f3be72776e559a5bc526f6875df0304e48d8c6 /tests | |
parent | 73d5f38a47e7c3dea62994cfb8f962976194f767 (diff) |
Flake follows: resolve all follows to absolute
It's not possible in general to know in computeLocks, relative to
which path the follows was intended to be. So, we always resolve
follows to their absolute states when we encounter them (which can
either be in parseFlakeInput or computeLocks' fake input population).
Fixes https://github.com/NixOS/nix/issues/6013
Fixes https://github.com/NixOS/nix/issues/5609
Fixes https://github.com/NixOS/nix/issues/5697 (again)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/flakes.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/flakes.sh b/tests/flakes.sh index 20e6d09c1..db178967f 100644 --- a/tests/flakes.sh +++ b/tests/flakes.sh @@ -730,6 +730,7 @@ cat > $flakeFollowsB/flake.nix <<EOF description = "Flake B"; inputs = { foobar.url = "path:$flakeFollowsA/flakeE"; + goodoo.follows = "C/goodoo"; C = { url = "path:./flakeC"; inputs.foobar.follows = "foobar"; @@ -744,6 +745,7 @@ cat > $flakeFollowsC/flake.nix <<EOF description = "Flake C"; inputs = { foobar.url = "path:$flakeFollowsA/flakeE"; + goodoo.follows = "foobar"; }; outputs = { ... }: {}; } @@ -759,7 +761,7 @@ EOF cat > $flakeFollowsE/flake.nix <<EOF { - description = "Flake D"; + description = "Flake E"; inputs = {}; outputs = { ... }: {}; } @@ -768,6 +770,8 @@ EOF git -C $flakeFollowsA add flake.nix flakeB/flake.nix \ flakeB/flakeC/flake.nix flakeD/flake.nix flakeE/flake.nix +nix flake metadata $flakeFollowsA + nix flake update $flakeFollowsA oldLock="$(cat "$flakeFollowsA/flake.lock")" |