From 8dfa3f18d42d852ece3f2d9cf1ae117acccc0b15 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 13 Nov 2026 21:09:17 +0000 Subject: populate: refer to flakes as git+file: only with a usable .git Writing the lock file of a git+file: flake, Nix runs Git, with the repository's configuration and hooks, which may run commands. A .git in a source's directory can come from anywhere, e.g. one planted in a materialized flake, or one a file source keeps. So drawing inputs refers to a flake as git+file: only if git_problems finds nothing wrong with its .git directory, the way git sources check their work trees, and else as path:. lock-foreign-git plants a .git in a materialized flake and in a file source that keeps it, whose configuration names an fsmonitor command. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 7344135..e2b3418 100644 --- a/README.md +++ b/README.md @@ -707,7 +707,10 @@ drawing an input from a source with a generated flake uses that flake. automatically. Sources in a Git work tree are referred to as `git+file:` (with submodules if -there are any), all other sources as `path:`, with symlinks resolved. Lock +there are any), all other sources as `path:`, with symlinks resolved. Nix +runs Git in a `git+file:` flake, so that's only for work trees whose `.git` +directory a `git` source would use, see +[The target directory](#the-target-directory). 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 -- cgit v1.3.1