mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
Pass dir in extraAttrs when overriding the registry
This is handled similarly in the handler for `--override-flake` in `MixEvalArgs`.
This commit is contained in:
parent
ed6ef7cdf4
commit
38663fb434
1 changed files with 7 additions and 1 deletions
|
|
@ -178,10 +178,16 @@ MixFlakeOptions::MixFlakeOptions()
|
||||||
for (auto & [inputName, input] : flake.lockFile.root->inputs) {
|
for (auto & [inputName, input] : flake.lockFile.root->inputs) {
|
||||||
auto input2 = flake.lockFile.findInput({inputName}); // resolve 'follows' nodes
|
auto input2 = flake.lockFile.findInput({inputName}); // resolve 'follows' nodes
|
||||||
if (auto input3 = std::dynamic_pointer_cast<const flake::LockedNode>(input2)) {
|
if (auto input3 = std::dynamic_pointer_cast<const flake::LockedNode>(input2)) {
|
||||||
|
fetchers::Attrs extraAttrs;
|
||||||
|
|
||||||
|
if (!input3->lockedRef.subdir.empty()) {
|
||||||
|
extraAttrs["dir"] = input3->lockedRef.subdir;
|
||||||
|
}
|
||||||
|
|
||||||
overrideRegistry(
|
overrideRegistry(
|
||||||
fetchers::Input::fromAttrs(fetchSettings, {{"type", "indirect"}, {"id", inputName}}),
|
fetchers::Input::fromAttrs(fetchSettings, {{"type", "indirect"}, {"id", inputName}}),
|
||||||
input3->lockedRef.input,
|
input3->lockedRef.input,
|
||||||
{});
|
extraAttrs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue