Merge pull request #3674 from matthewbauer/allow-empty-hash2

Allow empty hash in derivations
This commit is contained in:
Eelco Dolstra
2020-06-12 18:18:12 +02:00
committed by GitHub
6 changed files with 18 additions and 6 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ static void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
if (n == "url")
url = state.forceStringNoCtx(*attr.value, *attr.pos);
else if (n == "sha256")
expectedHash = Hash(state.forceStringNoCtx(*attr.value, *attr.pos), htSHA256);
expectedHash = newHashAllowEmpty(state.forceStringNoCtx(*attr.value, *attr.pos), htSHA256);
else if (n == "name")
name = state.forceStringNoCtx(*attr.value, *attr.pos);
else