aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fixtures.sh
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-12 18:24:47 +0000
committertv <tv@krebsco.de>2026-11-12 18:24:47 +0000
commitd86bcb07cb1f977e228d0bbf2b26507d29d94515 (patch)
treec3462c65c7b93c38790c6a58483797d0a29a81ad /tests/fixtures.sh
parent9359951b4470542049ceb63ad04b7526a4c6c9e8 (diff)
populate: draw inputs by rewriting lock files, add materialize and patches
Sources drawing inputs from other sources get the lock file of their flake rewritten with nix flake lock --override-input, so the flake in the source itself uses the other sources, and needs no generated flake to be found. file and git sources get their lock file rewritten in place. flake and flake-input sources get delivered as a copy with the rewritten lock file, which gets added to the store with nix-store --add-fixed, and the target path links to that. With rewriteLock set to false, and for symlink sources, the source stays as it is and gets a generated flake in .populate/flakes/<name>, which writeDeploy's flake parameter uses. flake and flake-input sources get two more options: - patches: patches on the deploying machine, which get uploaded to .populate/patches/<name> and applied in order with patch -p1 on the target, in the directory the target path shows. - materialize: the target path becomes a writable copy instead of a link into the store. Sources that get patched, rewritten, or materialized get delivered to .populate/derived/<name>/original, which also roots the delivered store path, and the flakes step derives the target path from there. Copies get made again only if what they derive from changes, which a key in .populate/derived/<name> records. The matrices of the file, flake, flake-input, and git tests cover both ways of drawing inputs, those of flake and flake-input materialize, the deploy test a source with a rewritten lock file, and features and edge cases run the scenarios drawing inputs both ways. New features cover patches, a patch that doesn't apply, patches in a subdirectory, reusing copies, and materializing.
Diffstat (limited to 'tests/fixtures.sh')
0 files changed, 0 insertions, 0 deletions