Skip to main content

Module pin

Module pin 

Source
Expand description

The pin matcher: the one line in a consumer’s flake.nix that names the release-kit tag.

Pure text in, values out: no file access and no spawning, so every caller — the offline observation, the preview, the transaction — reads one grammar. The matcher is anchored at both ends. Without the front anchor a commented example or a URL inside prose counts as a pin, and the “exactly one, or refuse” rule then counts the wrong thing; without the back anchor a subdirectory reference matches. The crate carries no regex engine, so the matcher is hand-written.

Structs§

Pin
One matched pin line, with the byte range of the tag alone.

Enums§

Scan
What a scan of flake.nix found.

Constants§

PIN_PREFIX
The flake-input URL prefix every consumer pin begins with; the tag follows it. A grammar in the same class as the branch grammar: a source constant, never a payload text.

Functions§

rewrite
The same text with one pin’s tag replaced. Only the tag’s bytes change: indentation, quoting, line endings, and a trailing comment survive byte for byte.
scan
Scan a flake’s text for the release-kit input line.