mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
housekeeping: shellcheck for tests/functional/flakes/circular.sh
This commit is contained in:
parent
ece86b7191
commit
3b853e795b
1 changed files with 14 additions and 14 deletions
|
@ -8,10 +8,10 @@ requireGit
|
||||||
flakeA=$TEST_ROOT/flakeA
|
flakeA=$TEST_ROOT/flakeA
|
||||||
flakeB=$TEST_ROOT/flakeB
|
flakeB=$TEST_ROOT/flakeB
|
||||||
|
|
||||||
createGitRepo $flakeA
|
createGitRepo "$flakeA"
|
||||||
createGitRepo $flakeB
|
createGitRepo "$flakeB"
|
||||||
|
|
||||||
cat > $flakeA/flake.nix <<EOF
|
cat > "$flakeA"/flake.nix <<EOF
|
||||||
{
|
{
|
||||||
inputs.b.url = git+file://$flakeB;
|
inputs.b.url = git+file://$flakeB;
|
||||||
inputs.b.inputs.a.follows = "/";
|
inputs.b.inputs.a.follows = "/";
|
||||||
|
@ -23,9 +23,9 @@ cat > $flakeA/flake.nix <<EOF
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
git -C $flakeA add flake.nix
|
git -C "$flakeA" add flake.nix
|
||||||
|
|
||||||
cat > $flakeB/flake.nix <<EOF
|
cat > "$flakeB"/flake.nix <<EOF
|
||||||
{
|
{
|
||||||
inputs.a.url = git+file://$flakeA;
|
inputs.a.url = git+file://$flakeA;
|
||||||
|
|
||||||
|
@ -35,18 +35,18 @@ cat > $flakeB/flake.nix <<EOF
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
git -C $flakeB add flake.nix
|
git -C "$flakeB" add flake.nix
|
||||||
git -C $flakeB commit -a -m 'Foo'
|
git -C "$flakeB" commit -a -m 'Foo'
|
||||||
|
|
||||||
[[ $(nix eval $flakeA#foo) = 1579 ]]
|
[[ $(nix eval "$flakeA#foo") = 1579 ]]
|
||||||
[[ $(nix eval $flakeA#foo) = 1579 ]]
|
[[ $(nix eval "$flakeA#foo") = 1579 ]]
|
||||||
|
|
||||||
sed -i $flakeB/flake.nix -e 's/456/789/'
|
sed -i "$flakeB"/flake.nix -e 's/456/789/'
|
||||||
git -C $flakeB commit -a -m 'Foo'
|
git -C "$flakeB" commit -a -m 'Foo'
|
||||||
|
|
||||||
nix flake update b --flake $flakeA
|
nix flake update b --flake "$flakeA"
|
||||||
[[ $(nix eval $flakeA#foo) = 1912 ]]
|
[[ $(nix eval "$flakeA#foo") = 1912 ]]
|
||||||
|
|
||||||
# Test list-inputs with circular dependencies
|
# Test list-inputs with circular dependencies
|
||||||
nix flake metadata $flakeA
|
nix flake metadata "$flakeA"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue