Skip to main content

Module devshell

Module devshell 

Source
Expand description

rk devshell: release-kit as a consumer project’s development dependency, kept fresh.

A consumer pins release-kit as a flake input at a release tag and takes rk from its devshell. Two files carry the fact: the tag in flake.nix is the version, and the release-kit node in flake.lock is the content. This module owns the offline observation of that wiring and the per-checkout state key; pin owns the line grammar, fragments the authored texts add serves, leftovers the predecessor catalog clean removes, discover the one network call, txn the fenced two-file transaction, and guard the gates around it.

Modules§

discover
The one network call the devshell verb makes: which release is the latest.
fragments
The texts rk devshell add serves: three flake fragments, the .envrc line, and the seed pair for a target that has neither file.
guard
The gates around the devshell transaction, so the .envrc line is safe on every directory entry.
leftovers
What a predecessor bump mechanism left in a target.
pin
The pin matcher: the one line in a consumer’s flake.nix that names the release-kit tag.
txn
The fenced two-file transaction behind rk devshell sync.

Structs§

Observed
Everything the offline pass reads from a target and this host’s state root. It spawns nothing and fetches nothing.

Enums§

Presence
Whether a file exists at its expected path.

Functions§

backup_dir
The directory a transaction backs the two files up into.
has_sync_line
Whether an .envrc text carries the sync line: a line whose trimmed start is the verb, whatever flags follow.
lock_path
The single-writer lock for one checkout.
marker_path
The marker an open transaction leaves until it commits or restores.
normalize_tag
Fold the three tag shapes — v0.2.16, 0.2.16, and the release URL — to one tag with exactly one leading v.
observe
Read a target’s devshell wiring, offline.
read_stamp
The day the last sync attempt was stamped, where one was.
stamp_path
The daily stamp for one checkout.
state_dir
The directory every devshell state file lives under: <state root>/devshell.
state_key
The per-checkout key every state file is named by: <basename>-<digest16> over the canonical path, so two clones never share a lock, a stamp, or a backup.