Implement buildDerivation() via the daemon
This commit is contained in:
parent
6e06a18d1b
commit
71a5161365
5 changed files with 34 additions and 2 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "archive.hh"
|
||||
#include "affinity.hh"
|
||||
#include "globals.hh"
|
||||
#include "derivations.hh"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
@ -458,7 +459,14 @@ void RemoteStore::buildPaths(const PathSet & drvPaths, BuildMode buildMode)
|
|||
BuildResult RemoteStore::buildDerivation(const Path & drvPath, const BasicDerivation & drv,
|
||||
BuildMode buildMode)
|
||||
{
|
||||
throw Error("not implemented");
|
||||
openConnection();
|
||||
to << wopBuildDerivation << drvPath << drv << buildMode;
|
||||
processStderr();
|
||||
BuildResult res;
|
||||
unsigned int status;
|
||||
from >> status >> res.errorMsg;
|
||||
res.status = (BuildResult::Status) status;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ typedef enum {
|
|||
wopQuerySubstitutablePaths = 32,
|
||||
wopQueryValidDerivers = 33,
|
||||
wopOptimiseStore = 34,
|
||||
wopVerifyStore = 35
|
||||
wopVerifyStore = 35,
|
||||
wopBuildDerivation = 36,
|
||||
} WorkerOp;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue