aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/derivations.hh
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-07-08 15:38:01 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2020-07-08 15:38:01 -0400
commitaf95a7c16b0fc0b033a7191f686fe98b2015162f (patch)
tree011186734ed386352aa3ae62e550a71a80e3ed3a /src/libstore/derivations.hh
parent7d8d78f06a637ba6b75285d299b07b81279c422f (diff)
Add name to BasicDerivation
We always have a name for BasicDerivation, since we have a derivation store path that has a name.
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r--src/libstore/derivations.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh
index 68c53c1ff..f9d328196 100644
--- a/src/libstore/derivations.hh
+++ b/src/libstore/derivations.hh
@@ -35,6 +35,7 @@ struct BasicDerivation
Path builder;
Strings args;
StringPairs env;
+ string name;
BasicDerivation() { }
virtual ~BasicDerivation() { };
@@ -76,7 +77,7 @@ StorePath writeDerivation(ref<Store> store,
const Derivation & drv, std::string_view name, RepairFlag repair = NoRepair);
/* Read a derivation from a file. */
-Derivation readDerivation(const Store & store, const Path & drvPath);
+Derivation readDerivation(const Store & store, const Path & drvPath, string name);
// FIXME: remove
bool isDerivation(const string & fileName);
@@ -93,7 +94,7 @@ bool wantOutput(const string & output, const std::set<string> & wanted);
struct Source;
struct Sink;
-Source & readDerivation(Source & in, const Store & store, BasicDerivation & drv);
+Source & readDerivation(Source & in, const Store & store, BasicDerivation & drv, string name);
void writeDerivation(Sink & out, const Store & store, const BasicDerivation & drv);
std::string hashPlaceholder(const std::string & outputName);