mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
Add setting 'allow-dirty-locks'
This allows writing lock files with dirty inputs, so long as they have a NAR hash. (Currently they always have a NAR hash, but with lazy trees that may not always be the case.) Generally dirty locks are bad for reproducibility (we can detect if the dirty input has changed, but we have no way to fetch it except substitution). Hence we don't allow them by default. Fixes #11181.
This commit is contained in:
parent
2d9b213cc2
commit
e161393299
12 changed files with 67 additions and 17 deletions
|
@ -182,7 +182,7 @@ static void fetchTree(
|
|||
if (!state.settings.pureEval && !input.isDirect() && experimentalFeatureSettings.isEnabled(Xp::Flakes))
|
||||
input = lookupInRegistries(state.store, input).first;
|
||||
|
||||
if (state.settings.pureEval && !input.isLocked()) {
|
||||
if (state.settings.pureEval && !input.isConsideredLocked(state.fetchSettings)) {
|
||||
auto fetcher = "fetchTree";
|
||||
if (params.isFetchGit)
|
||||
fetcher = "fetchGit";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue