1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 19:03:16 +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

@ -1,8 +1,6 @@
#ifndef __DERIVATIONS_H
#define __DERIVATIONS_H
#include <aterm1.h>
#include "hash.hh"
#include <map>
@ -53,17 +51,14 @@ struct Derivation
};
/* Hash an aterm. */
Hash hashTerm(ATerm t);
/* Write a derivation to the Nix store, and return its path. */
Path writeDerivation(const Derivation & drv, const string & name);
/* Parse a derivation. */
Derivation parseDerivation(ATerm t);
Derivation parseDerivation(const string & s);
/* Parse a derivation. */
ATerm unparseDerivation(const Derivation & drv);
/* Print a derivation. */
string unparseDerivation(const Derivation & drv);
/* Check whether a file name ends with the extensions for
derivations. */