mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
libcmd/modify-installables: build overrideValues differently
This commit is contained in:
parent
1e28a13720
commit
05d4a86923
1 changed files with 3 additions and 2 deletions
|
@ -45,10 +45,11 @@ ref<Installable> SourceExprCommand::modifyInstallable (
|
|||
state->callFunction(*vApply, *v, *vRes, noPos);
|
||||
} else if (overrideSet->size() > 0) {
|
||||
Value * overrideValues = state->allocValue();
|
||||
overrideValues->mkAttrs(state->buildBindings(overrideSet->size()).finish());
|
||||
auto overrideBinds = state->buildBindings(overrideSet->size());
|
||||
for (auto& v : *overrideSet) {
|
||||
overrideValues->attrs()->push_back(v);
|
||||
overrideBinds.insert(v);
|
||||
}
|
||||
overrideValues->mkAttrs(overrideBinds.finish());
|
||||
auto vOverrideFunctorAttr = v->attrs()->get(state->symbols.create("override"));
|
||||
if (!vOverrideFunctorAttr) {
|
||||
throw Error("%s is not overridable", installableName);
|
||||
|
|
Loading…
Reference in a new issue