aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/populate/src/flake_input.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-14 02:50:05 +0000
committertv <tv@krebsco.de>2026-11-14 03:59:29 +0100
commitfeda621a3a6b29c55c179059259d938d83e30f6e (patch)
treec14d03ef84c834571a5897024cf47e538c83f0dc /pkgs/populate/src/flake_input.rs
parent4ed0731ecab446ed0cc4a6146df414a36978e05b (diff)
populate: print what Nix says about lock files only if something changed
Looking at a flake with inputs drawn from sources, populate overrides those inputs with an empty flake, which makes Nix warn that it doesn't write the lock file it changed, listing the overrides, on every run, locally for archiving a flake or flake-input source, and on the target for checking the inputs drawn. nix_looking leaves that warning out of what Nix prints. A generated flake gets locked anew on every run, so it pins what the inputs are now, which made Nix print that it creates the lock file, listing all inputs, on every run. That only gets printed if the lock file differs from the one there was. No phase is expected to print Nix's warning, and relock's second phase, which changes nothing, isn't expected to print anything about the generated flake's lock file.
Diffstat (limited to 'pkgs/populate/src/flake_input.rs')
-rw-r--r--pkgs/populate/src/flake_input.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/populate/src/flake_input.rs b/pkgs/populate/src/flake_input.rs
index c611371..8d3a218 100644
--- a/pkgs/populate/src/flake_input.rs
+++ b/pkgs/populate/src/flake_input.rs
@@ -492,7 +492,8 @@ pub fn deliver(
)?
};
let here = |snippet: &str, args: &[&str]| {
- let mut command = run::local_shell(snippet, args, workdir);
+ let snippet = format!("{}{snippet}", sh::NIX_LOOKING);
+ let mut command = run::local_shell(&snippet, args, workdir);
command.env("NIX_CONFIG", nix_config());
run::output(&mut command)
};