diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-06-12 18:18:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 18:18:12 +0200 |
commit | 00fa7e2205877ec34dc3021fd73db6b6ad6bf112 (patch) | |
tree | 10550a3ac2efee0d01e061f0d034caced2461c41 /src/libfetchers | |
parent | 9f736dd89d064718a378703a9557de56fdd1a734 (diff) | |
parent | ea0d29d99a400c328fa0ca05ba5e639351673ebc (diff) |
Merge pull request #3674 from matthewbauer/allow-empty-hash2
Allow empty hash in derivations
Diffstat (limited to 'src/libfetchers')
-rw-r--r-- | src/libfetchers/fetchers.cc | 2 | ||||
-rw-r--r-- | src/libfetchers/tarball.cc | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/libfetchers/fetchers.cc b/src/libfetchers/fetchers.cc index ca555114d..11cac4c55 100644 --- a/src/libfetchers/fetchers.cc +++ b/src/libfetchers/fetchers.cc @@ -36,7 +36,7 @@ std::unique_ptr<Input> inputFromAttrs(const Attrs & attrs) if (res) { if (auto narHash = maybeGetStrAttr(attrs, "narHash")) // FIXME: require SRI hash. - res->narHash = Hash(*narHash); + res->narHash = newHashAllowEmpty(*narHash, htUnknown); return res; } } diff --git a/src/libfetchers/tarball.cc b/src/libfetchers/tarball.cc index 1b0eba18a..7966da314 100644 --- a/src/libfetchers/tarball.cc +++ b/src/libfetchers/tarball.cc @@ -264,8 +264,7 @@ struct TarballInputScheme : InputScheme auto input = std::make_unique<TarballInput>(parseURL(getStrAttr(attrs, "url"))); if (auto hash = maybeGetStrAttr(attrs, "hash")) - // FIXME: require SRI hash. - input->hash = Hash(*hash); + input->hash = newHashAllowEmpty(*hash, htUnknown); return input; } |