diff options
Diffstat (limited to 'tests/flakes.sh')
-rw-r--r-- | tests/flakes.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/flakes.sh b/tests/flakes.sh index 4642a7c2e..570f4f468 100644 --- a/tests/flakes.sh +++ b/tests/flakes.sh @@ -477,7 +477,7 @@ cat > $flake3Dir/flake.nix <<EOF EOF nix flake update $flake3Dir -[[ $(jq .inputs.foo.url $flake3Dir/flake.lock) = $(jq .inputs.bar.url $flake3Dir/flake.lock) ]] +[[ $(jq .inputs.foo.resolvedRef $flake3Dir/flake.lock) = $(jq .inputs.bar.resolvedRef $flake3Dir/flake.lock) ]] cat > $flake3Dir/flake.nix <<EOF { @@ -491,7 +491,7 @@ cat > $flake3Dir/flake.nix <<EOF EOF nix flake update $flake3Dir -[[ $(jq .inputs.bar.url $flake3Dir/flake.lock) =~ flake1 ]] +[[ $(jq .inputs.bar.resolvedRef.url $flake3Dir/flake.lock) =~ flake1 ]] cat > $flake3Dir/flake.nix <<EOF { @@ -505,7 +505,7 @@ cat > $flake3Dir/flake.nix <<EOF EOF nix flake update $flake3Dir -[[ $(jq .inputs.bar.url $flake3Dir/flake.lock) =~ flake2 ]] +[[ $(jq .inputs.bar.resolvedRef.url $flake3Dir/flake.lock) =~ flake2 ]] # Test overriding inputs of inputs. cat > $flake3Dir/flake.nix <<EOF @@ -520,7 +520,7 @@ cat > $flake3Dir/flake.nix <<EOF EOF nix flake update $flake3Dir -[[ $(jq .inputs.flake2.inputs.flake1.url $flake3Dir/flake.lock) =~ flake7 ]] +[[ $(jq .inputs.flake2.inputs.flake1.resolvedRef.url $flake3Dir/flake.lock) =~ flake7 ]] cat > $flake3Dir/flake.nix <<EOF { @@ -535,7 +535,7 @@ cat > $flake3Dir/flake.nix <<EOF EOF nix flake update $flake3Dir --recreate-lock-file -[[ $(jq .inputs.flake2.inputs.flake1.url $flake3Dir/flake.lock) =~ flake7 ]] +[[ $(jq .inputs.flake2.inputs.flake1.resolvedRef.url $flake3Dir/flake.lock) =~ flake7 ]] # Test Mercurial flakes. if [[ -z $(type -p hg) ]]; then @@ -603,20 +603,20 @@ nix build -o $TEST_ROOT/result "file://$TEST_ROOT/flake.tar.gz?narHash=sha256-qQ # Test --override-input. git -C $flake3Dir reset --hard nix flake update $flake3Dir --override-input flake2/flake1 flake5 -[[ $(jq .inputs.flake2.inputs.flake1.url $flake3Dir/flake.lock) =~ flake5 ]] +[[ $(jq .inputs.flake2.inputs.flake1.resolvedRef.url $flake3Dir/flake.lock) =~ flake5 ]] nix flake update $flake3Dir --override-input flake2/flake1 flake1 -[[ $(jq .inputs.flake2.inputs.flake1.url $flake3Dir/flake.lock) =~ flake1.*rev=$hash2 ]] +[[ $(jq -r .inputs.flake2.inputs.flake1.resolvedRef.rev $flake3Dir/flake.lock) =~ $hash2 ]] nix flake update $flake3Dir --override-input flake2/flake1 flake1/master/$hash1 -[[ $(jq .inputs.flake2.inputs.flake1.url $flake3Dir/flake.lock) =~ flake1.*rev=$hash1 ]] +[[ $(jq -r .inputs.flake2.inputs.flake1.resolvedRef.rev $flake3Dir/flake.lock) =~ $hash1 ]] # Test --update-input. nix flake update $flake3Dir -[[ $(jq .inputs.flake2.inputs.flake1.url $flake3Dir/flake.lock) =~ flake1.*rev=$hash1 ]] +[[ $(jq -r .inputs.flake2.inputs.flake1.resolvedRef.rev $flake3Dir/flake.lock) = $hash1 ]] nix flake update $flake3Dir --update-input flake2/flake1 -[[ $(jq .inputs.flake2.inputs.flake1.url $flake3Dir/flake.lock) =~ flake1.*rev=$hash2 ]] +[[ $(jq -r .inputs.flake2.inputs.flake1.resolvedRef.rev $flake3Dir/flake.lock) =~ $hash2 ]] # Test 'nix flake list-inputs'. [[ $(nix flake list-inputs $flake3Dir | wc -l) == 5 ]] |