diff options
| author | tv <tv@krebsco.de> | 2026-11-12 02:33:44 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-12 02:33:44 +0000 |
| commit | fd1485d077c06414752a90d2aef84b09d8a4cca2 (patch) | |
| tree | 9ababec0fbc25e3828e4304c868152fefb1ca2db /tests | |
| parent | 81cc4f06abc644b047e0758309cfbd982dac18ed (diff) | |
populate: name inputs of generated flakes validly
Generated flakes used source names as input names, but Nix accepts fewer
names there than populate does, e.g. not alt-1.0 or self. Following such
a source failed late, at locking, with an error mentioning neither krops
nor the source. Names Nix doesn't accept get replaced by ones derived
from them.
An edge case follows a source named alt-1.0.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/scenarios.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/scenarios.nix b/tests/scenarios.nix index 0e54054..6dbb84d 100644 --- a/tests/scenarios.nix +++ b/tests/scenarios.nix @@ -945,6 +945,17 @@ assert !(krops.isLocalTarget (targets.remote "/")); } ]; }) + (s "source-name" { + phases = twice { + sources = { + "alt-1.0".file = "/fixtures/alt"; + x.file = { path = "/fixtures/filesrc"; inputs.dep.follows = "alt-1.0"; }; + }; + check = '' + expect_eq msg "$(nix_eval_online "$T"/.populate/flakes/x#msg)" top:alt,sub + ''; + }; + }) ] ++ lib.optional (targetKind == "local") # The target has the path the input is locked to. (s "uselocal" { |
