The current flake.nix parser recognizes literal URL declarations written as name.url = "..." or name = { url = "..."; }. It returns no dependencies for the documented attribute-set form:
{
inputs.import-cargo = {
type = "github";
owner = "edolstra";
repo = "import-cargo";
};
outputs = { self, import-cargo }: {};
}
Parsing this through manifests.Parse("flake.nix", content) should return a direct dependency for import-cargo. The current result has an empty dependency list.
Support the attribute-set and URL-like forms described in the Nix flake input format. Account for indirect registry inputs, nested overrides, and follows relationships. Inputs declared only as outputs parameters are documented as equivalent to indirect registry inputs, so their treatment also needs an explicit choice and tests.
The parser should restrict extraction to the inputs attribute. Its current regexes scan the whole file after any occurrence of the word inputs.
Nix documents that flake inputs and metadata fields cannot be arbitrary Nix expressions, so a static syntax parser can read these fields without evaluating outputs.
Related consumer request: ecosyste-ms/parser#1199
Observed on git-pkgs/manifests main at a49fb29d74c7724ded24ee1d505319c1d9073395.
The current
flake.nixparser recognizes literal URL declarations written asname.url = "..."orname = { url = "..."; }. It returns no dependencies for the documented attribute-set form:Parsing this through
manifests.Parse("flake.nix", content)should return a direct dependency forimport-cargo. The current result has an empty dependency list.Support the attribute-set and URL-like forms described in the Nix flake input format. Account for indirect registry inputs, nested overrides, and
followsrelationships. Inputs declared only asoutputsparameters are documented as equivalent to indirect registry inputs, so their treatment also needs an explicit choice and tests.The parser should restrict extraction to the
inputsattribute. Its current regexes scan the whole file after any occurrence of the wordinputs.Nix documents that flake inputs and metadata fields cannot be arbitrary Nix expressions, so a static syntax parser can read these fields without evaluating
outputs.Related consumer request: ecosyste-ms/parser#1199
Observed on
git-pkgs/manifestsmain ata49fb29d74c7724ded24ee1d505319c1d9073395.