From 96f5ecf73dba5762de4148ce2e9a0fdd3e13270f Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 13 Nov 2026 16:48:38 +0000 Subject: populate: deliver flakes and draw inputs with the Rust program The program delivers flake and flake-input sources, draws inputs from sources, and removes state that sources don't need anymore, so it does everything the shell implementation does, and passes all scenarios. src/flake.rs builds the same shell code as shell.nix generates for these, with every value quoted, so both implementations behave alike while that code moves to Rust piece by piece. The ssh scripts in the temporary directory run the ssh that was in PATH when populate started, so one can be ssh in PATH for nix copy. The other one is for nix copy's ssh:// store, without the control socket. --- pkgs/populate/docs/design.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'pkgs/populate/docs') diff --git a/pkgs/populate/docs/design.md b/pkgs/populate/docs/design.md index a824f45..fd64c2b 100644 --- a/pkgs/populate/docs/design.md +++ b/pkgs/populate/docs/design.md @@ -176,7 +176,12 @@ Populate runs rsync, Git, ssh, and Nix as programs, found in `PATH`. ## Status -The program delivers `derivation`, `file`, `git`, `pass`, `passage`, -`pipe`, and `symlink` sources, makes backups, and prunes. Given `flake` -or `flake-input` sources, or sources drawing inputs from others, it fails -before changing anything, saying that these aren't implemented yet. +The program delivers all source types, draws inputs from sources, makes +backups, and prunes. The code for flakes, in `src/flake.rs`, builds the +same shell code that `shell.nix` generates, with every value quoted, so +both implementations behave alike; it moves to Rust piece by piece, with +the scenarios telling whether it still behaves alike. + +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. -- cgit v1.3.1