mirror of
https://github.com/NixOS/nix.git
synced 2024-11-28 17:52:25 +00:00
Test that the root of a tree produces /nix/store/<hash1>-<hash2>-source
This commit is contained in:
parent
e18c3d4670
commit
f29a220b70
@ -25,6 +25,8 @@ writeSimpleFlake() {
|
||||
parent = builtins.dirOf ./.;
|
||||
|
||||
baseName = builtins.baseNameOf ./.;
|
||||
|
||||
root = ./.;
|
||||
};
|
||||
}
|
||||
EOF
|
||||
|
@ -235,7 +235,10 @@ nix build -o "$TEST_ROOT/result" --expr "(builtins.getFlake \"git+file://$flake1
|
||||
[[ $(nix eval --json flake1#parent) = \""$NIX_STORE_DIR"\" ]]
|
||||
|
||||
# Regression test for baseNameOf on the root of the flake.
|
||||
[[ $(nix eval --raw flake1#baseName) =~ ^[a-z0-9]*-source$ ]]
|
||||
[[ $(nix eval --raw flake1#baseName) =~ ^[a-z0-9]+-source$ ]]
|
||||
|
||||
# Test that the root of a tree returns a path named /nix/store/<hash1>-<hash2>-source (#10627).
|
||||
[[ $(nix eval --raw flake1#root) =~ ^.*/[a-z0-9]+-[a-z0-9]+-source$ ]]
|
||||
|
||||
# Building a flake with an unlocked dependency should fail in pure mode.
|
||||
(! nix build -o "$TEST_ROOT/result" flake2#bar --no-registries)
|
||||
|
Loading…
Reference in New Issue
Block a user