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. --- pkgs/populate/default.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkgs') diff --git a/pkgs/populate/default.nix b/pkgs/populate/default.nix index 7a52ca9..06197b6 100644 --- a/pkgs/populate/default.nix +++ b/pkgs/populate/default.nix @@ -89,6 +89,9 @@ let rest = if parent == null then x.path else drop (length parent) x.path; in "inputs.${toJSON base}" + + # A source with a generated flake has itself as input therein. + optionalString (parent != null && generated ? ${base}) + ".inputs.${toJSON base}" + concatMapStrings (name: ".inputs.${toJSON name}") rest + ".follows = ${toJSON x.source};"; in /* sh */ '' -- cgit v1.3.1