From 408fcc6584ca598533a0f8c9012d60450db148a8 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 12 Nov 2026 02:33:43 +0000 Subject: populate: place overrides on sources with generated flakes correctly An override below an input drawn from a source that has a generated flake itself got placed on that generated flake, which has no such input, so Nix ignored it with a warning. Generated flakes have their source as input of the same name, so the override goes below that. An edge case overrides an input of a source with a generated flake. --- tests/fixtures.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/fixtures.sh') diff --git a/tests/fixtures.sh b/tests/fixtures.sh index 9813c8f..8222b13 100755 --- a/tests/fixtures.sh +++ b/tests/fixtures.sh @@ -216,6 +216,23 @@ cat > /fixtures/rel/flake.nix <<'NIX' NIX (cd /fixtures/rel && nix flake lock && git init -q && commit rel) +# two, c1, c2: a flake with two inputs, and two flakes to draw them from. +mkdir /fixtures/two /fixtures/c1 /fixtures/c2 +cat > /fixtures/two/flake.nix < /fixtures/c1/flake.nix <<'NIX' +{ outputs = _: { who = "c1"; }; } +NIX +cat > /fixtures/c2/flake.nix <<'NIX' +{ outputs = _: { who = "c2"; }; } +NIX + # noflake: a directory without flake.nix. mkdir /fixtures/noflake echo noflake > /fixtures/noflake/README -- cgit v1.3.1