about summary refs log tree commit diff
path: root/src/libstore/storeexpr.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-01-19T14·36+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-01-19T14·36+0000
commit06c77bf7a861221d41b5db9fad3002f13a14ed0e (patch)
tree8ddd8857f0364297bb8ffce1cf6a89b7cf0d396e /src/libstore/storeexpr.hh
parent863dcff6c5ffc163010ec1f9e6819bb9aaaadc29 (diff)
* Change extension `.store' to `.drv'.
* Re-enable `nix-store --query --requisites'.

Diffstat (limited to 'src/libstore/storeexpr.hh')
-rw-r--r--src/libstore/storeexpr.hh30
1 files changed, 11 insertions, 19 deletions
diff --git a/src/libstore/storeexpr.hh b/src/libstore/storeexpr.hh
index 8eb80a19a845..c7b35f8ebe45 100644
--- a/src/libstore/storeexpr.hh
+++ b/src/libstore/storeexpr.hh
@@ -5,23 +5,11 @@
 #include "store.hh"
 
 
-/* Abstract syntax of store expressions. */
+/* Extension of derivations in the Nix store. */
+const string drvExtension = ".drv";
 
-struct ClosureElem
-{
-    PathSet refs;
-};
-
-typedef map<Path, ClosureElem> ClosureElems;
-
-/*
-struct Closure
-{
-    PathSet roots;
-    ClosureElems elems;
-};
-*/
 
+/* Abstract syntax of derivations. */
 
 struct DerivationOutput
 {
@@ -57,14 +45,18 @@ struct Derivation
 /* Hash an aterm. */
 Hash hashTerm(ATerm t);
 
-/* Write an aterm to the Nix store directory, and return its path. */
-Path writeTerm(ATerm t, const string & suffix);
+/* Write a derivation to the Nix store, and return its path. */
+Path writeDerivation(const Derivation & drv, const string & name);
 
-/* Parse a store expression. */
+/* Parse a derivation. */
 Derivation parseDerivation(ATerm t);
 
-/* Parse a store expression. */
+/* Parse a derivation. */
 ATerm unparseDerivation(const Derivation & drv);
 
+/* Check whether a file name ends with the extensions for
+   derivations. */
+bool isDerivation(const string & fileName);
+
 
 #endif /* !__STOREEXPR_H */