1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 22:01:15 +02:00

* Don't use the ATerm library for parsing/printing .drv files.

This commit is contained in:
Eelco Dolstra 2010-04-19 13:46:58 +00:00
parent 55b5ddd3ca
commit efc7a579e8
14 changed files with 174 additions and 330 deletions

View file

@ -2,8 +2,6 @@
#include "store-api.hh"
#include "local-store.hh"
#include <aterm2.h>
namespace nix {
@ -12,9 +10,7 @@ Derivation derivationFromPath(const Path & drvPath)
{
assertStorePath(drvPath);
store->ensurePath(drvPath);
ATerm t = ATreadFromNamedFile(drvPath.c_str());
if (!t) throw Error(format("cannot read aterm from `%1%'") % drvPath);
return parseDerivation(t);
return parseDerivation(readFile(drvPath));
}