| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Populate is the program in Rust only. pkgs.populate checks its arguments,
and returns a script running the program with them as JSON. The
arguments it took for the shell implementation, dash, jq, and
implementation, stay accepted and unused, so overrides setting them keep
working.
Copying flakes to remote targets using sudo gets refused during
evaluation, as before, by checks.nix, and by the program for specs from
elsewhere.
The jq test goes with the jq programs; the program's unit tests cover
their equivalents.
|
|
|
pkgs.populate takes implementation: "shell", the default, generates a
script from populate's arguments, and "rust" passes them as JSON to the
program in pkgs/populate, built from the crate there by program.nix.
The program checks the spec as checks.nix does during evaluation, with the
same messages, and reports that delivering sources isn't implemented yet.
rustProgram replaces the program, e.g. with one built some other way.
checks.nix holds the checks of populate's arguments during evaluation.
Both implementations check the names of sources and the target path with
it, and the Rust one's wrapper also checks drawing inputs, which the shell
implementation checks where it draws them.
nix-build tests --argstr implementation rust runs the scenarios with the
Rust implementation. They expect it to refuse copying flakes to targets
using sudo when it runs, not during evaluation, because only then it
decides whether the target is local.
|