Merge remote-tracking branch 'origin/master' into coerce-string
This commit is contained in:
+7
-5
@@ -9,7 +9,7 @@ using namespace nix;
|
||||
|
||||
struct CmdBundle : InstallableCommand
|
||||
{
|
||||
std::string bundler = "github:matthewbauer/nix-bundle";
|
||||
std::string bundler = "github:NixOS/bundlers";
|
||||
std::optional<Path> outLink;
|
||||
|
||||
CmdBundle()
|
||||
@@ -97,21 +97,23 @@ struct CmdBundle : InstallableCommand
|
||||
throw Error("the bundler '%s' does not produce a derivation", bundler.what());
|
||||
|
||||
PathSet context2;
|
||||
auto drvPath = evalState->coerceToStorePath(*attr1->pos, *attr1->value, context2, "");
|
||||
auto drvPath = evalState->coerceToStorePath(attr1->pos, *attr1->value, context2, "");
|
||||
|
||||
auto attr2 = vRes->attrs->get(evalState->sOutPath);
|
||||
if (!attr2)
|
||||
throw Error("the bundler '%s' does not produce a derivation", bundler.what());
|
||||
|
||||
auto outPath = evalState->coerceToStorePath(*attr2->pos, *attr2->value, context2, "");
|
||||
auto outPath = evalState->coerceToStorePath(attr2->pos, *attr2->value, context2, "");
|
||||
|
||||
store->buildPaths({ DerivedPath::Built { drvPath } });
|
||||
|
||||
auto outPathS = store->printStorePath(outPath);
|
||||
|
||||
if (!outLink) {
|
||||
auto &attr = vRes->attrs->need(evalState->sName);
|
||||
outLink = evalState->forceStringNoCtx(*attr.value, *attr.pos, "");
|
||||
auto * attr = vRes->attrs->get(evalState->sName);
|
||||
if (!attr)
|
||||
throw Error("attribute 'name' missing");
|
||||
outLink = evalState->forceStringNoCtx(*attr->value, attr->pos, "");
|
||||
}
|
||||
|
||||
// TODO: will crash if not a localFSStore?
|
||||
|
||||
Reference in New Issue
Block a user