aboutsummaryrefslogtreecommitdiff
path: root/src/nix/bundle.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/bundle.cc')
-rw-r--r--src/nix/bundle.cc19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/nix/bundle.cc b/src/nix/bundle.cc
index 113ceca33..c13018328 100644
--- a/src/nix/bundle.cc
+++ b/src/nix/bundle.cc
@@ -74,21 +74,16 @@ struct CmdBundle : InstallableCommand
{
auto evalState = getEvalState();
- auto [progFlakeRef, progName] = parseFlakeRefWithFragment(installable->what(), absPath("."));
- const flake::LockFlags lockFlagsProg{ .writeLockFile = false };
- auto programInstallable = InstallableFlake(this,
- evalState, std::move(progFlakeRef),
- Strings{progName == "" ? "defaultApp" : progName},
- Strings(this->getDefaultFlakeAttrPathPrefixes()),
- lockFlagsProg);
- auto val = programInstallable.toValue(*evalState).first;
+ auto val = installable->toValue(*evalState).first;
auto [bundlerFlakeRef, bundlerName] = parseFlakeRefWithFragment(bundler, absPath("."));
const flake::LockFlags lockFlags{ .writeLockFile = false };
- auto bundler = InstallableFlake(this,
- evalState, std::move(bundlerFlakeRef),
- Strings{bundlerName == "" ? "defaultBundler." + settings.thisSystem.get() : settings.thisSystem.get() + "." + bundlerName, bundlerName},
- Strings({"","bundlers."}), lockFlags);
+ InstallableFlake bundler{this,
+ evalState, std::move(bundlerFlakeRef), bundlerName,
+ {"defaultBundler." + settings.thisSystem.get()},
+ {"bundlers." + settings.thisSystem.get() + "."},
+ lockFlags
+ };
auto vRes = evalState->allocValue();
evalState->callFunction(*bundler.toValue(*evalState).first, *val, *vRes, noPos);