diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-06-12 09:51:44 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-06-12 09:51:44 -0500 |
commit | 3e3eaa90dd1aaf4684697f27726ec72aec75206c (patch) | |
tree | 2365284578972746e8574defa8c4312db5599312 /src/libstore | |
parent | 79c169d1c615211af69c1cbc6218f7465a4f81ed (diff) |
Remove hashed-mirrors
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/builtins/fetchurl.cc | 14 | ||||
-rw-r--r-- | src/libstore/globals.hh | 3 |
2 files changed, 0 insertions, 17 deletions
diff --git a/src/libstore/builtins/fetchurl.cc b/src/libstore/builtins/fetchurl.cc index 486babf14..254cb4fce 100644 --- a/src/libstore/builtins/fetchurl.cc +++ b/src/libstore/builtins/fetchurl.cc @@ -58,20 +58,6 @@ void builtinFetchurl(const BasicDerivation & drv, const std::string & netrcData) } }; - /* Try the hashed mirrors first. */ - if (getAttr("outputHashMode") == "flat") - for (auto hashedMirror : settings.hashedMirrors.get()) - try { - if (!hasSuffix(hashedMirror, "/")) hashedMirror += '/'; - auto ht = parseHashType(getAttr("outputHashAlgo")); - auto h = Hash(getAttr("outputHash"), ht); - fetch(hashedMirror + printHashType(h.type) + "/" + h.to_string(Base16, false)); - return; - } catch (Error & e) { - debug(e.what()); - } - - /* Otherwise try the specified URL. */ fetch(mainUrl); } diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index da95fd3ae..2e1e405b3 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -339,9 +339,6 @@ public: "setuid/setgid bits or with file capabilities."}; #endif - Setting<Strings> hashedMirrors{this, {"http://tarballs.nixos.org/"}, "hashed-mirrors", - "A list of servers used by builtins.fetchurl to fetch files by hash."}; - Setting<uint64_t> minFree{this, 0, "min-free", "Automatically run the garbage collector when free disk space drops below the specified amount."}; |