diff options
| author | tv <tv@krebsco.de> | 2026-11-14 01:24:34 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-14 02:45:43 +0100 |
| commit | 361b504079389cfd6f8cf3160da96b88cc5e5a69 (patch) | |
| tree | a74d65e8365b9244211057aaeac144de83bae546 /pkgs/populate/README.md | |
| parent | e4991d754160dd851b980f142e4b9a23815eafa3 (diff) | |
Whether a derived copy of a flake or flake-input source needs to be
made again depends on the sources it draws inputs from. For one that
isn't in the store, the key had its hash, so every run read all of it,
e.g. all of a nixpkgs work tree, .git included, which takes long even
when nothing changed. For a Git work tree that Nix gets as git+file:,
whose commit and tracked files are all Nix uses, the key has its
commit instead, if no tracked file differs from it, which Git tells
quickly. git_flake decides what Nix gets as git+file:, for resolve as
well.
Keys of copies drawing from such work trees change once, so those
copies get made again on the first run, also after deploying with
krops 1.
rewrite-cache-git checks that such a copy gets made again for a new
commit, but not for redeploying, nor for an untracked file.
Diffstat (limited to 'pkgs/populate/README.md')
| -rw-r--r-- | pkgs/populate/README.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/populate/README.md b/pkgs/populate/README.md index f96ef49..63ec6bd 100644 --- a/pkgs/populate/README.md +++ b/pkgs/populate/README.md @@ -559,7 +559,9 @@ see [The target directory](#the-target-directory), and has no hooks. Lock files get rewritten or generated on every run, so they match the sources. Copies of `flake` and `flake-input` sources get made again only if the delivered store path, the patches, or the sources they draw inputs from -change. Inputs that get drawn from other sources don't get delivered with +change. For a source in a Git work tree that Nix gets as `git+file:`, +that's its commit and tracked files, which populate checks with Git; +other sources get read entirely, to hash them. Inputs that get drawn from other sources don't get delivered with a `flake` or `flake-input` source, and neither does what they pin. Generated flakes and copies get removed once their sources no longer need them. This requires Nix with flake support (Nix 2.4 or later) on the |
