docs/vendor-nix-inspiration.md
This vendoring model does not replace Cargo with Nix, but it borrows core Nix ideas to get reproducibility, control, and fast iteration.
vendor.lock.toml pins vendored source by exact commit.Cargo.lock pins resolved crate versions.Nix analogy: flake/lock pinning exact inputs.
lib/vendor-manifest/<crate>.toml records checksums and upstream metadata.verify --strict-provenance enforces provenance completeness.Nix analogy: content-addressed trust and auditable input provenance.
scripts/vendor/vendor-repo.sh hydrate materializes lib/vendor/* from lock state.Cargo.toml.Nix analogy: declarative store realization from a locked graph.
vendor-control.sh inhouse snapshots and rolls back on failure.Nix analogy: atomic generation switch + rollback.
flow-vendor,flow.Nix analogy: separate immutable store objects from top-level project logic.
cargo tree -d, offenders.sh).Nix analogy: reducing closure size to speed builds and improve iteration.
~/code/rise/scripts/vendor-control.sh sync --project ~/code/flow -- --important --dry-run
~/code/rise/scripts/vendor-control.sh sync --project ~/code/flow -- --important
~/code/rise/scripts/vendor-control.sh verify --project ~/code/flow --strict-provenance
scripts/vendor/vendor-repo.sh hydrate
cargo check -q
This gives a Nix-like operational discipline while preserving Cargo ecosystem behavior.