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:
parent
4cafea7c7b
commit
6832ee5d6f
4 changed files with 164 additions and 152 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue