mirror of
https://github.com/NixOS/nix
synced 2025-06-29 23:13:14 +02:00
* Put building in the store API.
This commit is contained in:
parent
e2ef5e07fd
commit
6ecb840fd1
11 changed files with 31 additions and 48 deletions
|
@ -1,6 +1,5 @@
|
|||
#include "misc.hh"
|
||||
#include "store-api.hh"
|
||||
#include "build.hh"
|
||||
#include "db.hh"
|
||||
|
||||
#include <aterm2.h>
|
||||
|
@ -12,7 +11,7 @@ namespace nix {
|
|||
Derivation derivationFromPath(const Path & drvPath)
|
||||
{
|
||||
assertStorePath(drvPath);
|
||||
ensurePath(drvPath);
|
||||
store->ensurePath(drvPath);
|
||||
ATerm t = ATreadFromNamedFile(drvPath.c_str());
|
||||
if (!t) throw Error(format("cannot read aterm from `%1%'") % drvPath);
|
||||
return parseDerivation(t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue