#!/usr/bin/env bash source ./common.sh requireGit # Test a "vendored" subflake dependency. This is a relative path flake # which doesn't reference the root flake and has its own lock file. # # This might occur in a monorepo for example. The root flake.lock is # populated from the dependency's flake.lock. rootFlake="$TEST_ROOT/flake1" subflake="$rootFlake/sub" depFlakeA="$TEST_ROOT/depFlakeA" depFlakeB="$TEST_ROOT/depFlakeB" rm -rf "$rootFlake" mkdir -p "$rootFlake" "$subflake" "$depFlakeA" "$depFlakeB" cat > "$depFlakeA/flake.nix" < "$depFlakeB/flake.nix" < "$subflake/flake.nix" < "$rootFlake/flake.nix" <