about summary refs log tree commit diff
path: root/src/libstore/derivations.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-06-28T16·11+0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-03T09·38+0200
commitfcca702a96a8ca0e73f6d035052c30121776aeba (patch)
tree73f85b723f0cac6054a7c7e89ffa040b7b890456 /src/libstore/derivations.hh
parent90da34e421607ad6c40f3dea08709ae89db7a7e1 (diff)
Replace a few bool flags with enums
Functions like copyClosure() had 3 bool arguments, which creates a
severe risk of mixing up arguments.

Also, implement copyClosure() using copyPaths().
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r--src/libstore/derivations.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh
index 9717a81e469c..7b97730d3bf2 100644
--- a/src/libstore/derivations.hh
+++ b/src/libstore/derivations.hh
@@ -2,6 +2,7 @@
 
 #include "types.hh"
 #include "hash.hh"
+#include "store-api.hh"
 
 #include <map>
 
@@ -85,7 +86,7 @@ class Store;
 
 /* Write a derivation to the Nix store, and return its path. */
 Path writeDerivation(ref<Store> store,
-    const Derivation & drv, const string & name, bool repair = false);
+    const Derivation & drv, const string & name, RepairFlag repair = NoRepair);
 
 /* Read a derivation from a file. */
 Derivation readDerivation(const Path & drvPath);