1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

tests/function/flakes/relative-paths: Test #13164

This commit is contained in:
Robert Hensing 2025-05-14 22:48:56 +02:00 committed by Matt Sturgeon
parent 46beb9af76
commit eaee0b4740
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -129,3 +129,46 @@ EOF
# would fail:
nix eval .#ok
)
# https://github.com/NixOS/nix/issues/13164
mkdir -p "$TEST_ROOT/issue-13164/nested-flake1/nested-flake2"
(
cd "$TEST_ROOT/issue-13164"
git init
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
cat >flake.nix <<EOF
{
inputs.nestedFlake1.url = "path:./nested-flake1";
outputs = { self, nestedFlake1 }: {
inherit nestedFlake1;
};
}
EOF
cat >nested-flake1/flake.nix <<EOF
{
inputs.nestedFlake2.url = "path:./nested-flake2";
outputs = { self, nestedFlake2 }: {
name = "nestedFlake1";
inherit nestedFlake2;
};
}
EOF
cat >nested-flake1/nested-flake2/flake.nix <<EOF
{
outputs = { self }: {
name = "nestedFlake2";
};
}
EOF
git add .
git commit -m "Initial commit"
# I don't understand why two calls are necessary to reproduce the issue.
nix eval --json .#nestedFlake1.nestedFlake2 --no-eval-cache
nix eval --json .#nestedFlake1.nestedFlake2 --no-eval-cache
)