diff options
| author | tv <tv@krebsco.de> | 2026-11-13 18:46:19 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-13 19:48:42 +0100 |
| commit | 841ddf3e6d5472362e45f3dbc079a368285467f9 (patch) | |
| tree | 25f80597e1f34781540f5df917f02e4540787d87 /pkgs/populate/docs/design.md | |
| parent | 0e0880fc606e9277c1a52e637cebe7dd3438410d (diff) | |
populate: draw flake inputs natively in Rust
The program decides how to draw inputs and derive copies of flake and
flake-input sources itself. The target runs fixed snippets, which send
back what it needs to know: where paths resolve to and what's there, the
lock files of flakes as nix flake metadata prints them, and what tells
whether a derived copy needs to be made again. The program checks that
drawn inputs exist in the lock files, computes the keys of derived
copies, and writes generated flakes.
Derived copies get the same keys as with the shell implementation, so
switching implementations doesn't make them again.
Diffstat (limited to 'pkgs/populate/docs/design.md')
| -rw-r--r-- | pkgs/populate/docs/design.md | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkgs/populate/docs/design.md b/pkgs/populate/docs/design.md index 3340ccf..9e606b2 100644 --- a/pkgs/populate/docs/design.md +++ b/pkgs/populate/docs/design.md @@ -177,12 +177,12 @@ Populate runs rsync, Git, ssh, and Nix as programs, found in `PATH`. ## Status The program delivers all source types, draws inputs from sources, makes -backups, and prunes. Drawing inputs, in `src/flake.rs`, builds the same -shell code that `shell.nix` generates, with every value quoted; it moves -to Rust like delivering flake and flake-input sources did, in -`src/flake_input.rs`, which reads what Nix prints as JSON itself, and runs -fixed snippets on the target that send JSON or store paths back. +backups, and prunes. It decides what to do itself: the snippets it runs +on the target send back what it needs to know, e.g. what Nix prints as +JSON, where paths resolve to, or store paths. Delivering flake and +flake-input sources is in `src/flake_input.rs`, drawing inputs and +deriving copies in `src/flake.rs`. -The jq programs in `flake-jq.nix`, which the shell implementation and the -jq test use, have equivalents in Rust, with the jq test's cases as unit -tests. +The jq programs and Nix functions in `flake-jq.nix`, which the shell +implementation and the jq test use, have equivalents in Rust, with unit +tests, among them the jq test's cases. |
