mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-16 15:17:18 +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);
|
state->callFunction(*vApply, *v, *vRes, noPos);
|
||||||
} else if (overrideSet->size() > 0) {
|
} else if (overrideSet->size() > 0) {
|
||||||
Value * overrideValues = state->allocValue();
|
Value * overrideValues = state->allocValue();
|
||||||
overrideValues->mkAttrs(state->buildBindings(overrideSet->size()).finish());
|
auto overrideBinds = state->buildBindings(overrideSet->size());
|
||||||
for (auto& v : *overrideSet) {
|
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"));
|
auto vOverrideFunctorAttr = v->attrs()->get(state->symbols.create("override"));
|
||||||
if (!vOverrideFunctorAttr) {
|
if (!vOverrideFunctorAttr) {
|
||||||
throw Error("%s is not overridable", installableName);
|
throw Error("%s is not overridable", installableName);
|
||||||
|
|
Loading…
Add table
Reference in a new issue