diff options
| author | tv <tv@krebsco.de> | 2026-11-12 02:33:43 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-12 02:33:43 +0000 |
| commit | d63531d2d42524f5150d138000bec42fd49d1e71 (patch) | |
| tree | 9d5e3cdfa081251e4524b8e4b9678312b57d2fe5 /pkgs/populate | |
| parent | 408fcc6584ca598533a0f8c9012d60450db148a8 (diff) | |
populate: draw inputs from sources that aren't flakes
Generated flakes declared every source they draw inputs from as a flake,
so drawing an input declared with flake = false from a source without
flake.nix failed, although the README says it works. Such sources get
declared with flake = false now.
An edge case draws a non-flake input from a source without flake.nix.
Diffstat (limited to 'pkgs/populate')
| -rw-r--r-- | pkgs/populate/default.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/populate/default.nix b/pkgs/populate/default.nix index 06197b6..08a624b 100644 --- a/pkgs/populate/default.nix +++ b/pkgs/populate/default.nix @@ -108,6 +108,11 @@ let printf ' inputs.%s.url = "%s";\n' ${quote (toJSON name)} "$url" ${concatImapStrings (i: source: /* sh */ '' printf ' inputs.%s.url = "%s";\n' ${quote (toJSON source)} "$url${toString i}" + ${optionalString (!generated ? ${source}) /* sh */ '' + if ! test -e "$(readlink -f ${quote "${target.path}/${source}"})"/flake.nix; then + printf ' inputs.%s.flake = false;\n' ${quote (toJSON source)} + fi + ''} '') drawn} ${concatMapStrings (x: /* sh */ '' printf ' %s\n' ${quote (override x)} |
