mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 06:42:28 +00:00
Add test for nix flake update
with multiple inputs
This commit is contained in:
parent
9f11b1b0c4
commit
b1ad729add
@ -564,6 +564,16 @@ nix flake lock "$flake3Dir"
|
|||||||
nix flake update flake2/flake1 --flake "$flake3Dir"
|
nix flake update flake2/flake1 --flake "$flake3Dir"
|
||||||
[[ $(jq -r .nodes.flake1_2.locked.rev "$flake3Dir/flake.lock") =~ $hash2 ]]
|
[[ $(jq -r .nodes.flake1_2.locked.rev "$flake3Dir/flake.lock") =~ $hash2 ]]
|
||||||
|
|
||||||
|
# Test updating multiple inputs.
|
||||||
|
nix flake lock "$flake3Dir" --override-input flake1 flake1/master/$hash1
|
||||||
|
nix flake lock "$flake3Dir" --override-input flake2/flake1 flake1/master/$hash1
|
||||||
|
[[ $(jq -r .nodes.flake1.locked.rev "$flake3Dir/flake.lock") =~ $hash1 ]]
|
||||||
|
[[ $(jq -r .nodes.flake1_2.locked.rev "$flake3Dir/flake.lock") =~ $hash1 ]]
|
||||||
|
|
||||||
|
nix flake update flake1 flake2/flake1 --flake "$flake3Dir"
|
||||||
|
[[ $(jq -r .nodes.flake1.locked.rev "$flake3Dir/flake.lock") =~ $hash2 ]]
|
||||||
|
[[ $(jq -r .nodes.flake1_2.locked.rev "$flake3Dir/flake.lock") =~ $hash2 ]]
|
||||||
|
|
||||||
# Test 'nix flake metadata --json'.
|
# Test 'nix flake metadata --json'.
|
||||||
nix flake metadata "$flake3Dir" --json | jq .
|
nix flake metadata "$flake3Dir" --json | jq .
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user