1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-09 16:13:54 +02:00

Move non-flake input tests into a separate file

This commit is contained in:
Eelco Dolstra 2024-11-20 19:51:04 +01:00
parent 4cafea7c7b
commit 6832ee5d6f
4 changed files with 164 additions and 152 deletions

View file

@ -53,6 +53,29 @@ createFlake1() {
nix registry add --registry "$registry" flake1 "git+file://$flake1Dir"
}
createFlake2() {
flake2Dir="$TEST_ROOT/flake 2"
percentEncodedFlake2Dir="$TEST_ROOT/flake%202"
# Give one repo a non-main initial branch.
createGitRepo "$flake2Dir" "--initial-branch=main"
cat > "$flake2Dir/flake.nix" <<EOF
{
description = "Fnord";
outputs = { self, flake1 }: rec {
packages.$system.bar = flake1.packages.$system.foo;
};
}
EOF
git -C "$flake2Dir" add flake.nix
git -C "$flake2Dir" commit -m 'Initial'
nix registry add --registry "$registry" flake2 "git+file://$percentEncodedFlake2Dir"
}
writeDependentFlake() {
local flakeDir="$1"
cat > "$flakeDir/flake.nix" <<EOF