aboutsummaryrefslogtreecommitdiff
path: root/tests/flakes/flakes.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-12-07 15:23:01 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-12-12 14:05:52 +0100
commitfd0ed7511818ba871dc3e28796ec1d0ca57b22ec (patch)
tree75aeee532ba00a2f9a52f472bdcba46969e8a711 /tests/flakes/flakes.sh
parentae5f62a894190e0075eb60ae4537ba81ca2a0a8d (diff)
Support flake references in the old CLI
Fixes #7026.
Diffstat (limited to 'tests/flakes/flakes.sh')
-rw-r--r--tests/flakes/flakes.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/flakes/flakes.sh b/tests/flakes/flakes.sh
index 8cdc320fb..5ef4d0a7a 100644
--- a/tests/flakes/flakes.sh
+++ b/tests/flakes/flakes.sh
@@ -473,3 +473,9 @@ nix store delete $(nix store add-path $badFlakeDir)
[[ $(nix path-info $(nix store add-path $flake1Dir)) =~ flake1 ]]
[[ $(nix path-info path:$(nix store add-path $flake1Dir)) =~ simple ]]
+
+# Test fetching flakerefs in the legacy CLI.
+[[ $(nix-instantiate --eval flake:flake3 -A x) = 123 ]]
+[[ $(nix-instantiate --eval flake:git+file://$flake3Dir -A x) = 123 ]]
+[[ $(nix-instantiate -I flake3=flake:flake3 --eval '<flake3>' -A x) = 123 ]]
+[[ $(NIX_PATH=flake3=flake:flake3 nix-instantiate --eval '<flake3>' -A x) = 123 ]]