mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-16 15:17:18 +02:00
libcmd: attrs -> attrs()
This commit is contained in:
parent
2d0b0537fe
commit
1e28a13720
1 changed files with 4 additions and 4 deletions
|
@ -47,9 +47,9 @@ ref<Installable> SourceExprCommand::modifyInstallable (
|
||||||
Value * overrideValues = state->allocValue();
|
Value * overrideValues = state->allocValue();
|
||||||
overrideValues->mkAttrs(state->buildBindings(overrideSet->size()).finish());
|
overrideValues->mkAttrs(state->buildBindings(overrideSet->size()).finish());
|
||||||
for (auto& v : *overrideSet) {
|
for (auto& v : *overrideSet) {
|
||||||
overrideValues->attrs->push_back(v);
|
overrideValues->attrs()->push_back(v);
|
||||||
}
|
}
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ ref<Installable> SourceExprCommand::modifyInstallable (
|
||||||
state->callFunction(*vOverrideFunctor, *overrideValues, *vRes, noPos);
|
state->callFunction(*vOverrideFunctor, *overrideValues, *vRes, noPos);
|
||||||
} else if (installableOverrideAttrs) {
|
} else if (installableOverrideAttrs) {
|
||||||
state->eval(state->parseExprFromString(fmt("old: with old; %s",*installableOverrideAttrs), state->rootPath(".")), *vApply);
|
state->eval(state->parseExprFromString(fmt("old: with old; %s",*installableOverrideAttrs), state->rootPath(".")), *vApply);
|
||||||
auto vOverrideFunctorAttr = v->attrs->get(state->symbols.create("overrideAttrs"));
|
auto vOverrideFunctorAttr = v->attrs()->get(state->symbols.create("overrideAttrs"));
|
||||||
if (!vOverrideFunctorAttr) {
|
if (!vOverrideFunctorAttr) {
|
||||||
throw Error("%s is not overrideAttrs-capable", installableName);
|
throw Error("%s is not overrideAttrs-capable", installableName);
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ ref<Installable> SourceExprCommand::modifyInstallable (
|
||||||
state->callFunction(*vOverrideFunctor, *vApply, *vRes, noPos);
|
state->callFunction(*vOverrideFunctor, *vApply, *vRes, noPos);
|
||||||
} else if (installableWithPackages) {
|
} else if (installableWithPackages) {
|
||||||
state->eval(state->parseExprFromString(fmt("ps: with ps; %s",*installableWithPackages), state->rootPath(".")), *vApply);
|
state->eval(state->parseExprFromString(fmt("ps: with ps; %s",*installableWithPackages), state->rootPath(".")), *vApply);
|
||||||
auto vOverrideFunctorAttr = v->attrs->get(state->symbols.create("withPackages"));
|
auto vOverrideFunctorAttr = v->attrs()->get(state->symbols.create("withPackages"));
|
||||||
if (!vOverrideFunctorAttr) {
|
if (!vOverrideFunctorAttr) {
|
||||||
throw Error("%s cannot be extended with additional packages", installableName);
|
throw Error("%s cannot be extended with additional packages", installableName);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue