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:
parent
1676a04197
commit
766a236014
1 changed files with 17 additions and 0 deletions
|
|
@ -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 ]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue