Fix build with Nix 2.29
This commit is contained in:
parent
e6df0c141c
commit
de10c0e0fb
@ -50,7 +50,7 @@ static std::unique_ptr<SSHMaster::Connection> openConnection(
|
|||||||
auto remoteStore = machine->storeUri.params.find("remote-store");
|
auto remoteStore = machine->storeUri.params.find("remote-store");
|
||||||
if (remoteStore != machine->storeUri.params.end()) {
|
if (remoteStore != machine->storeUri.params.end()) {
|
||||||
command.push_back("--store");
|
command.push_back("--store");
|
||||||
command.push_back(shellEscape(remoteStore->second));
|
command.push_back(escapeShellArgAlways(remoteStore->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include <nix/util/signals.hh>
|
#include <nix/util/signals.hh>
|
||||||
#include "state.hh"
|
#include "state.hh"
|
||||||
#include "hydra-build-result.hh"
|
#include "hydra-build-result.hh"
|
||||||
#include <nix/store/store-api.hh>
|
#include <nix/store/store-open.hh>
|
||||||
#include <nix/store/remote-store.hh>
|
#include <nix/store/remote-store.hh>
|
||||||
|
|
||||||
#include <nix/store/globals.hh>
|
#include <nix/store/globals.hh>
|
||||||
@ -832,7 +832,7 @@ void State::run(BuildID buildOne)
|
|||||||
<< metricsAddr << "/metrics (port " << exposerPort << ")"
|
<< metricsAddr << "/metrics (port " << exposerPort << ")"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
Store::Params localParams;
|
Store::Config::Params localParams;
|
||||||
localParams["max-connections"] = "16";
|
localParams["max-connections"] = "16";
|
||||||
localParams["max-connection-age"] = "600";
|
localParams["max-connection-age"] = "600";
|
||||||
localStore = openStore(getEnv("NIX_REMOTE").value_or(""), localParams);
|
localStore = openStore(getEnv("NIX_REMOTE").value_or(""), localParams);
|
||||||
|
@ -492,8 +492,14 @@ Step::ptr State::createStep(ref<Store> destStore,
|
|||||||
runnable while step->created == false. */
|
runnable while step->created == false. */
|
||||||
step->drv = std::make_unique<Derivation>(localStore->readDerivation(drvPath));
|
step->drv = std::make_unique<Derivation>(localStore->readDerivation(drvPath));
|
||||||
{
|
{
|
||||||
auto parsedDrv = ParsedDerivation{drvPath, *step->drv};
|
auto parsedOpt = StructuredAttrs::tryParse(step->drv->env);
|
||||||
step->drvOptions = std::make_unique<DerivationOptions>(DerivationOptions::fromParsedDerivation(parsedDrv));
|
try {
|
||||||
|
step->drvOptions = std::make_unique<DerivationOptions>(
|
||||||
|
DerivationOptions::fromStructuredAttrs(step->drv->env, parsedOpt ? &*parsedOpt : nullptr));
|
||||||
|
} catch (Error & e) {
|
||||||
|
e.addTrace({}, "while parsing derivation '%s'", localStore->printStorePath(drvPath));
|
||||||
|
throw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
step->preferLocalBuild = step->drvOptions->willBuildLocally(*localStore, *step->drv);
|
step->preferLocalBuild = step->drvOptions->willBuildLocally(*localStore, *step->drv);
|
||||||
|
@ -172,7 +172,7 @@ struct Step
|
|||||||
nix::StorePath drvPath;
|
nix::StorePath drvPath;
|
||||||
std::unique_ptr<nix::Derivation> drv;
|
std::unique_ptr<nix::Derivation> drv;
|
||||||
std::unique_ptr<nix::DerivationOptions> drvOptions;
|
std::unique_ptr<nix::DerivationOptions> drvOptions;
|
||||||
std::set<std::string> requiredSystemFeatures;
|
nix::StringSet requiredSystemFeatures;
|
||||||
bool preferLocalBuild;
|
bool preferLocalBuild;
|
||||||
bool isDeterministic;
|
bool isDeterministic;
|
||||||
std::string systemType; // concatenation of drv.platform and requiredSystemFeatures
|
std::string systemType; // concatenation of drv.platform and requiredSystemFeatures
|
||||||
|
Loading…
x
Reference in New Issue
Block a user