aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/derivations.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-24 15:41:29 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-24 15:41:29 +0000
commitd9fb9e9f26e29d9d9001af700deada32ca740cf6 (patch)
treea288f855e465f7abf8bd5c09c40af98213c74e03 /src/libstore/derivations.cc
parent93bbe6e8ab9ae4b76942a2acafa072483be20807 (diff)
parent3c50e84387e51858f10c540e721a938592f30949 (diff)
Merge remote-tracking branch 'upstream/master' into ca-drv
Diffstat (limited to 'src/libstore/derivations.cc')
-rw-r--r--src/libstore/derivations.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc
index cec2ba792..ce2b66fcf 100644
--- a/src/libstore/derivations.cc
+++ b/src/libstore/derivations.cc
@@ -8,11 +8,6 @@
namespace nix {
-std::string DerivationOutputHash::printMethodAlgo() const {
- return makeFileIngestionPrefix(method) + printHashType(*hash.type);
-}
-
-
bool derivationIsCA(DerivationType dt) {
switch (dt) {
case DerivationType::Regular: return false;
@@ -139,7 +134,7 @@ static DerivationOutput parseDerivationOutput(const Store & store, istringstream
expect(str, ","); const auto hash = parseString(str);
expect(str, ")");
- std::optional<DerivationOutputHash> fsh;
+ std::optional<FixedOutputHash> fsh;
if (hashAlgo != "") {
auto method = FileIngestionMethod::Flat;
if (string(hashAlgo, 0, 2) == "r:") {
@@ -147,7 +142,7 @@ static DerivationOutput parseDerivationOutput(const Store & store, istringstream
hashAlgo = string(hashAlgo, 2);
}
const HashType hashType = parseHashType(hashAlgo);
- fsh = DerivationOutputHash {
+ fsh = FixedOutputHash {
.method = std::move(method),
.hash = Hash(hash, hashType),
};
@@ -446,7 +441,7 @@ static DerivationOutput readDerivationOutput(Source & in, const Store & store)
auto hashAlgo = readString(in);
const auto hash = readString(in);
- std::optional<DerivationOutputHash> fsh;
+ std::optional<FixedOutputHash> fsh;
if (hashAlgo != "") {
auto method = FileIngestionMethod::Flat;
if (string(hashAlgo, 0, 2) == "r:") {
@@ -454,7 +449,7 @@ static DerivationOutput readDerivationOutput(Source & in, const Store & store)
hashAlgo = string(hashAlgo, 2);
}
const HashType hashType = parseHashType(hashAlgo);
- fsh = DerivationOutputHash {
+ fsh = FixedOutputHash {
.method = std::move(method),
.hash = Hash(hash, hashType),
};