aboutsummaryrefslogtreecommitdiff
path: root/src/nix/bundle.cc
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-07-30 15:37:05 -0500
committerMatthew Bauer <mjbauer95@gmail.com>2020-07-30 15:37:05 -0500
commitfa2d1fb36e2ee92622379b9716f5b06e73aae72e (patch)
treecbb971f4301b53b7e16a75bf9cba0048b2594462 /src/nix/bundle.cc
parent22fcfdf18af84bbbbc1bd416a9eed37a64e26eb5 (diff)
Pass system to bundler
Diffstat (limited to 'src/nix/bundle.cc')
-rw-r--r--src/nix/bundle.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nix/bundle.cc b/src/nix/bundle.cc
index 95aed5269..f2b78eea5 100644
--- a/src/nix/bundle.cc
+++ b/src/nix/bundle.cc
@@ -75,17 +75,21 @@ struct CmdBundle : InstallableCommand
const flake::LockFlags lockFlags{ .writeLockFile = false };
auto bundler = InstallableFlake(
evalState, std::move(bundlerFlakeRef),
- Strings{bundlerName == "" ? ("defaultBundler." + settings.thisSystem.get()) : bundlerName},
- Strings({"bundlers." + settings.thisSystem.get() + "."}), lockFlags);
+ Strings{bundlerName == "" ? "defaultBundler" : bundlerName},
+ Strings({"bundlers."}), lockFlags);
Value * arg = evalState->allocValue();
- evalState->mkAttrs(*arg, 1);
+ evalState->mkAttrs(*arg, 2);
PathSet context;
for (auto & i : app.context)
context.insert("=" + store->printStorePath(i.path));
mkString(*evalState->allocAttr(*arg, evalState->symbols.create("program")), app.program, context);
+ mkString(*evalState->allocAttr(*arg, evalState->symbols.create("system")), settings.thisSystem.get());
+
+ arg->attrs->sort();
+
auto vRes = evalState->allocValue();
evalState->callFunction(*bundler.toValue(*evalState).first, *arg, *vRes, noPos);