mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
tests/flakes: check git+file:./${submodule} protocol
Relative, local git repo used to work (for submodules), but it fails after3e0129ce3b
. This commit adds a test to prevent such failure in the future. (cherry picked from commit9d088fa502
)
This commit is contained in:
parent
6e44bc2a89
commit
84e3f4ad79
1 changed files with 8 additions and 0 deletions
|
@ -228,6 +228,14 @@ nix build -o "$TEST_ROOT/result" "git+file://$flake1Dir#default"
|
|||
nix build -o "$TEST_ROOT/result" "$flake1Dir?ref=HEAD#default"
|
||||
nix build -o "$TEST_ROOT/result" "git+file://$flake1Dir?ref=HEAD#default"
|
||||
|
||||
# Check that relative paths are allowed for git flakes.
|
||||
# This may change in the future once git submodule support is refined.
|
||||
# See: https://discourse.nixos.org/t/57783 and #9708.
|
||||
(
|
||||
cd "$flake1Dir/.."
|
||||
nix build -o "$TEST_ROOT/result" "git+file:./$(basename "$flake1Dir")"
|
||||
)
|
||||
|
||||
# Check that store symlinks inside a flake are not interpreted as flakes.
|
||||
nix build -o "$flake1Dir/result" "git+file://$flake1Dir"
|
||||
nix path-info "$flake1Dir/result"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue