source ./common.sh requireGit flakeFollowsA=$TEST_ROOT/follows/flakeA flakeFollowsB=$TEST_ROOT/follows/flakeA/flakeB flakeFollowsC=$TEST_ROOT/follows/flakeA/flakeB/flakeC flakeFollowsD=$TEST_ROOT/follows/flakeA/flakeD flakeFollowsE=$TEST_ROOT/follows/flakeA/flakeE # Test following path flakerefs. createGitRepo $flakeFollowsA mkdir -p $flakeFollowsB mkdir -p $flakeFollowsC mkdir -p $flakeFollowsD mkdir -p $flakeFollowsE cat > $flakeFollowsA/flake.nix < $flakeFollowsB/flake.nix < $flakeFollowsC/flake.nix < $flakeFollowsD/flake.nix < $flakeFollowsE/flake.nix < $flakeFollowsA/flake.nix < $flakeFollowsA/flake.nix <&1 | grep 'points outside' # Non-existant follows should print a warning. cat >$flakeFollowsA/flake.nix <&1 | grep "warning: input 'B' has an override for a non-existent input 'invalid'" nix flake lock $flakeFollowsA 2>&1 | grep "warning: input 'B' has an override for a non-existent input 'invalid2'" # Now test follow path overloading flakeFollowsOverloadA=$TEST_ROOT/follows/overload/flakeA flakeFollowsOverloadB=$TEST_ROOT/follows/overload/flakeA/flakeB flakeFollowsOverloadC=$TEST_ROOT/follows/overload/flakeA/flakeB/flakeC flakeFollowsOverloadD=$TEST_ROOT/follows/overload/flakeA/flakeB/flakeC/flakeD # Test following path flakerefs. createGitRepo $flakeFollowsOverloadA mkdir -p $flakeFollowsOverloadB mkdir -p $flakeFollowsOverloadC mkdir -p $flakeFollowsOverloadD cat > $flakeFollowsOverloadD/flake.nix < $flakeFollowsOverloadC/flake.nix < $flakeFollowsOverloadB/flake.nix < $flakeFollowsOverloadA/flake.nix <