diff options
Diffstat (limited to 'tests/functional/flakes')
-rw-r--r-- | tests/functional/flakes/circular.sh | 3 | ||||
-rw-r--r-- | tests/functional/flakes/flakes.sh | 16 | ||||
-rw-r--r-- | tests/functional/flakes/follow-paths.sh | 4 |
3 files changed, 12 insertions, 11 deletions
diff --git a/tests/functional/flakes/circular.sh b/tests/functional/flakes/circular.sh index 09cd02edf..d3bb8e8a3 100644 --- a/tests/functional/flakes/circular.sh +++ b/tests/functional/flakes/circular.sh @@ -42,7 +42,8 @@ git -C $flakeB commit -a -m 'Foo' sed -i $flakeB/flake.nix -e 's/456/789/' git -C $flakeB commit -a -m 'Foo' -[[ $(nix eval --update-input b $flakeA#foo) = 1912 ]] +nix flake update b --flake $flakeA +[[ $(nix eval $flakeA#foo) = 1912 ]] # Test list-inputs with circular dependencies nix flake metadata $flakeA diff --git a/tests/functional/flakes/flakes.sh b/tests/functional/flakes/flakes.sh index 7781eb51b..dfa088960 100644 --- a/tests/functional/flakes/flakes.sh +++ b/tests/functional/flakes/flakes.sh @@ -302,8 +302,8 @@ nix build -o $TEST_ROOT/result flake4#xyzzy nix flake lock $flake3Dir [[ -z $(git -C $flake3Dir diff master || echo failed) ]] -nix flake update $flake3Dir --override-flake flake2 nixpkgs -[[ ! -z $(git -C $flake3Dir diff master || echo failed) ]] +nix flake update --flake "$flake3Dir" --override-flake flake2 nixpkgs +[[ ! -z $(git -C "$flake3Dir" diff master || echo failed) ]] # Make branch "removeXyzzy" where flake3 doesn't have xyzzy anymore git -C $flake3Dir checkout -b removeXyzzy @@ -439,9 +439,9 @@ cat > $flake3Dir/flake.nix <<EOF } EOF -nix flake update $flake3Dir -[[ $(jq -c .nodes.flake2.inputs.flake1 $flake3Dir/flake.lock) =~ '["foo"]' ]] -[[ $(jq .nodes.foo.locked.url $flake3Dir/flake.lock) =~ flake7 ]] +nix flake update --flake "$flake3Dir" +[[ $(jq -c .nodes.flake2.inputs.flake1 "$flake3Dir/flake.lock") =~ '["foo"]' ]] +[[ $(jq .nodes.foo.locked.url "$flake3Dir/flake.lock") =~ flake7 ]] # Test git+file with bare repo. rm -rf $flakeGitBare @@ -478,12 +478,12 @@ nix flake lock $flake3Dir --override-input flake2/flake1 flake1 nix flake lock $flake3Dir --override-input flake2/flake1 flake1/master/$hash1 [[ $(jq -r .nodes.flake1_2.locked.rev $flake3Dir/flake.lock) =~ $hash1 ]] -# Test --update-input. nix flake lock $flake3Dir [[ $(jq -r .nodes.flake1_2.locked.rev $flake3Dir/flake.lock) = $hash1 ]] -nix flake lock $flake3Dir --update-input flake2/flake1 -[[ $(jq -r .nodes.flake1_2.locked.rev $flake3Dir/flake.lock) =~ $hash2 ]] +# Test updating an individual input of a flake lockfile. +nix flake update flake2/flake1 --flake "$flake3Dir" +[[ $(jq -r .nodes.flake1_2.locked.rev "$flake3Dir/flake.lock") =~ $hash2 ]] # Test 'nix flake metadata --json'. nix flake metadata $flake3Dir --json | jq . diff --git a/tests/functional/flakes/follow-paths.sh b/tests/functional/flakes/follow-paths.sh index dc97027ac..efc5f95d8 100644 --- a/tests/functional/flakes/follow-paths.sh +++ b/tests/functional/flakes/follow-paths.sh @@ -77,7 +77,7 @@ git -C $flakeFollowsA add flake.nix flakeB/flake.nix \ nix flake metadata $flakeFollowsA -nix flake update $flakeFollowsA +nix flake update --flake $flakeFollowsA nix flake lock $flakeFollowsA @@ -228,5 +228,5 @@ git -C "$flakeFollowsOverloadA" add flake.nix flakeB/flake.nix \ flakeB/flakeC/flake.nix flakeB/flakeC/flakeD/flake.nix nix flake metadata "$flakeFollowsOverloadA" -nix flake update "$flakeFollowsOverloadA" +nix flake update --flake "$flakeFollowsOverloadA" nix flake lock "$flakeFollowsOverloadA" |