mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-07 10:47:18 +02:00
fix build
This commit is contained in:
parent
fd78c9b000
commit
2b1349ac18
4 changed files with 9 additions and 10 deletions
|
@ -552,7 +552,7 @@ Bindings * SourceExprCommand::getOverrideArgs(EvalState & state, ref<Store> stor
|
|||
Value * v = state.allocValue();
|
||||
if (i.second[0] == 'E') {
|
||||
// is a raw expression, parse
|
||||
state.mkThunk_(*v, state.parseExprFromString(std::string(i.second, 1), state.rootPath(CanonPath::fromCwd())));
|
||||
state.mkThunk_(*v, state.parseExprFromString(std::string(i.second, 1), state.rootPath(".")));
|
||||
} else if (i.second[0] == 'F') {
|
||||
// is a flakeref
|
||||
auto iV = InstallableValue::require(parseInstallable(store, std::string(i.second, 1), false, false));
|
||||
|
@ -598,13 +598,12 @@ Installables SourceExprCommand::parseInstallables(
|
|||
auto e = state->parseStdin();
|
||||
state->eval(e, *vFile);
|
||||
}
|
||||
else if (file)
|
||||
else if (file) {
|
||||
auto dir = absPath(getCommandBaseDir());
|
||||
state->evalFile(lookupFileArg(*state, *file, &dir), *vFile);
|
||||
else if (callPackageFile) {
|
||||
auto dir = absPath(getCommandBaseDir());
|
||||
} else if (callPackageFile) {
|
||||
auto fileLoc = absPath(*callPackageFile);
|
||||
auto e = state->parseExprFromString(fmt("(import <nixpkgs> {}).callPackage %s {}", &fileLoc), state->rootPath(&dir));
|
||||
auto e = state->parseExprFromString(fmt("(import <nixpkgs> {}).callPackage %s {}", fileLoc), state->rootPath("."));
|
||||
state->eval(e, *vFile);
|
||||
} else {
|
||||
Path dir = absPath(getCommandBaseDir());
|
||||
|
|
|
@ -41,7 +41,7 @@ ref<Installable> SourceExprCommand::modifyInstallable (
|
|||
auto overrideSet = getOverrideArgs(*state, store);
|
||||
|
||||
if (applyToInstallable) {
|
||||
state->eval(state->parseExprFromString(*applyToInstallable, state->rootPath(CanonPath::fromCwd())), *vApply);
|
||||
state->eval(state->parseExprFromString(*applyToInstallable, state->rootPath(".")), *vApply);
|
||||
state->callFunction(*vApply, *v, *vRes, noPos);
|
||||
} else if (overrideSet->size() > 0) {
|
||||
Value * overrideValues = state->allocValue();
|
||||
|
@ -56,7 +56,7 @@ ref<Installable> SourceExprCommand::modifyInstallable (
|
|||
auto vOverrideFunctor = vOverrideFunctorAttr->value;
|
||||
state->callFunction(*vOverrideFunctor, *overrideValues, *vRes, noPos);
|
||||
} else if (installableOverrideAttrs) {
|
||||
state->eval(state->parseExprFromString(fmt("old: with old; %s",*installableOverrideAttrs), state->rootPath(CanonPath::fromCwd())), *vApply);
|
||||
state->eval(state->parseExprFromString(fmt("old: with old; %s",*installableOverrideAttrs), state->rootPath(".")), *vApply);
|
||||
auto vOverrideFunctorAttr = v->attrs->get(state->symbols.create("overrideAttrs"));
|
||||
if (!vOverrideFunctorAttr) {
|
||||
throw Error("%s is not overrideAttrs-capable", installableName);
|
||||
|
@ -64,7 +64,7 @@ ref<Installable> SourceExprCommand::modifyInstallable (
|
|||
auto vOverrideFunctor = vOverrideFunctorAttr->value;
|
||||
state->callFunction(*vOverrideFunctor, *vApply, *vRes, noPos);
|
||||
} else if (installableWithPackages) {
|
||||
state->eval(state->parseExprFromString(fmt("ps: with ps; %s",*installableWithPackages), state->rootPath(CanonPath::fromCwd())), *vApply);
|
||||
state->eval(state->parseExprFromString(fmt("ps: with ps; %s",*installableWithPackages), state->rootPath(".")), *vApply);
|
||||
auto vOverrideFunctorAttr = v->attrs->get(state->symbols.create("withPackages"));
|
||||
if (!vOverrideFunctorAttr) {
|
||||
throw Error("%s cannot be extended with additional packages", installableName);
|
||||
|
|
|
@ -93,7 +93,7 @@ struct CmdHomeApply : HomeActivationCommand
|
|||
struct CmdHome : NixMultiCommand
|
||||
{
|
||||
CmdHome()
|
||||
: MultiCommand({
|
||||
: NixMultiCommand("home", {
|
||||
{"build", []() { return make_ref<CmdHomeBuild>(); }},
|
||||
{"apply", []() { return make_ref<CmdHomeApply>(); }},
|
||||
})
|
||||
|
|
|
@ -170,7 +170,7 @@ struct CmdSystemBoot : SystemActivationCommand
|
|||
struct CmdSystem : NixMultiCommand
|
||||
{
|
||||
CmdSystem()
|
||||
: MultiCommand({
|
||||
: NixMultiCommand("system", {
|
||||
{"build", []() { return make_ref<CmdSystemBuild>(); }},
|
||||
{"activate", []() { return make_ref<CmdSystemActivate>(); }},
|
||||
{"apply", []() { return make_ref<CmdSystemApply>(); }},
|
||||
|
|
Loading…
Add table
Reference in a new issue