diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-06-29 14:23:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 14:23:50 +0200 |
commit | 5a18e2a533f7f3b52e242ddcd6d18dd991be5ea7 (patch) | |
tree | f14e281c186d297b51ff64ff53832d6f932eaa66 /src/libexpr | |
parent | f14c3b6f68bca44e014a9f460827519610e773b2 (diff) | |
parent | 4cff8188a5b59303f726a2497727fff34f9711d3 (diff) |
Merge pull request #4959 from NixOS/override-non-flake-inputs
Keep the `isFlake` attribute for overriden inputs
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/flake/flake.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc index 2e94490d4..8e6f06949 100644 --- a/src/libexpr/flake/flake.cc +++ b/src/libexpr/flake/flake.cc @@ -359,7 +359,12 @@ LockedFlake lockFlake( ancestors? */ auto i = overrides.find(inputPath); bool hasOverride = i != overrides.end(); - if (hasOverride) overridesUsed.insert(inputPath); + if (hasOverride) { + overridesUsed.insert(inputPath); + // Respect the “flakeness” of the input even if we + // override it + i->second.isFlake = input2.isFlake; + } auto & input = hasOverride ? i->second : input2; /* Resolve 'follows' later (since it may refer to an input |