1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

Test that dir is propagated from registry entry

(cherry picked from commit 258d41bfb6)
This commit is contained in:
Cole Helbling 2025-09-07 16:21:22 +02:00 committed by Mergify
parent 1676a04197
commit 766a236014

View file

@ -470,3 +470,20 @@ cat > "$flake3Dir/flake.nix" <<EOF
EOF
[[ "$(nix flake metadata --json "$flake3Dir" | jq -r .locks.nodes.flake1.locked.rev)" = $prevFlake1Rev ]]
baseDir=$TEST_ROOT/$RANDOM
subdirFlakeDir=$baseDir/foo
mkdir -p "$subdirFlakeDir"
writeSimpleFlake "$baseDir"
cat > "$subdirFlakeDir"/flake.nix <<EOF
{
outputs = inputs: {
shouldBeOne = 1;
};
}
EOF
nix registry add --registry "$registry" flake2 "path:$baseDir?dir=foo"
[[ "$(nix eval --flake-registry "$registry" flake2#shouldBeOne)" = 1 ]]