aboutsummaryrefslogtreecommitdiff
path: root/tests/flakes.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-01-22 20:00:58 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-01-22 20:00:58 +0100
commitb5c9dbc84f31a1e9d1e5b6642b1716daa13c18ed (patch)
tree9c064107d9c9a81bb7f4ce821e55b522a2ca048d /tests/flakes.sh
parent90d55ed275220962f7239f4869905b0237dd24fb (diff)
Fix --override-flake and add a test
Diffstat (limited to 'tests/flakes.sh')
-rw-r--r--tests/flakes.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/flakes.sh b/tests/flakes.sh
index 334f750fb..337645fb4 100644
--- a/tests/flakes.sh
+++ b/tests/flakes.sh
@@ -293,6 +293,13 @@ nix build -o $TEST_ROOT/result --flake-registry $registry flake3#xyzzy flake3#fn
# Test doing multiple `lookupFlake`s
nix build -o $TEST_ROOT/result --flake-registry $registry flake4#xyzzy
+# Test 'nix flake update' and --override-flake.
+nix flake update --flake-registry $registry $flake3Dir
+[[ -z $(git -C $flake3Dir diff master) ]]
+
+nix flake update --flake-registry $registry $flake3Dir --recreate-lock-file --override-flake flake2 nixpkgs
+[[ ! -z $(git -C $flake3Dir diff master) ]]
+
# Make branch "removeXyzzy" where flake3 doesn't have xyzzy anymore
git -C $flake3Dir checkout -b removeXyzzy
rm $flake3Dir/flake.nix