diff --git a/Makefile b/Makefile
index 469070533b5135a107f9b67f96437986c47e243f..e3057c36ca2457023e72f825102323853f1d71fd 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@ makefiles = \
   nix-rust/local.mk \
   src/libutil/local.mk \
   src/libstore/local.mk \
+  src/libfetchers/local.mk \
   src/libmain/local.mk \
   src/libexpr/local.mk \
   src/nix/local.mk \
diff --git a/local.mk b/local.mk
index a63cfd8435b5552c5acc3dab9f5cf1b7c6149004..b57e4b0610e8ba251b9c3a5d5147db4c7ba330a6 100644
--- a/local.mk
+++ b/local.mk
@@ -6,7 +6,7 @@ dist-files += configure config.h.in perl/configure
 
 clean-files += Makefile.config
 
-GLOBAL_CXXFLAGS += -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr -I src/nix -Wno-deprecated-declarations
+GLOBAL_CXXFLAGS += -I . -I src -I src/libutil -I src/libstore -I src/libfetchers -I src/libmain -I src/libexpr -I src/nix -Wno-deprecated-declarations
 
 $(foreach i, config.h $(wildcard src/lib*/*.hh), \
   $(eval $(call install-file-in, $(i), $(includedir)/nix, 0644)))
diff --git a/src/libexpr/common-eval-args.cc b/src/libexpr/common-eval-args.cc
index 9ebb6a835b3cd777d924b26e9fafd2627a78da81..bf502514783363aa98e495ae4581fc769367c656 100644
--- a/src/libexpr/common-eval-args.cc
+++ b/src/libexpr/common-eval-args.cc
@@ -3,8 +3,8 @@
 #include "download.hh"
 #include "util.hh"
 #include "eval.hh"
-#include "fetchers/registry.hh"
-#include "fetchers/fetchers.hh"
+#include "registry.hh"
+#include "fetchers.hh"
 #include "flake/flakeref.hh"
 #include "store-api.hh"
 
diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc
index 9517e3645ee92024f57764e5d5f59e90b293faea..59362c0188ce0439010620e9cc1bf21e7cde7fe3 100644
--- a/src/libexpr/flake/flake.cc
+++ b/src/libexpr/flake/flake.cc
@@ -3,7 +3,7 @@
 #include "primops.hh"
 #include "eval-inline.hh"
 #include "store-api.hh"
-#include "fetchers/fetchers.hh"
+#include "fetchers.hh"
 #include "finally.hh"
 
 namespace nix {
diff --git a/src/libexpr/flake/flakeref.cc b/src/libexpr/flake/flakeref.cc
index 5c38f7ea57f265197b415795b8d038090a7305e4..de91f2eed1d55a83ee1d9b7fafd56fb08ac69d40 100644
--- a/src/libexpr/flake/flakeref.cc
+++ b/src/libexpr/flake/flakeref.cc
@@ -1,9 +1,8 @@
 #include "flakeref.hh"
 #include "store-api.hh"
-#include "fetchers/parse.hh"
-#include "fetchers/fetchers.hh"
-#include "fetchers/registry.hh"
-#include "fetchers/regex.hh"
+#include "url.hh"
+#include "fetchers.hh"
+#include "registry.hh"
 
 namespace nix {
 
diff --git a/src/libexpr/flake/flakeref.hh b/src/libexpr/flake/flakeref.hh
index d23a8f601db461cecd753e742f15a40a7fcf5c37..1dbb6e54d914a60a070824694c4493ca612cd605 100644
--- a/src/libexpr/flake/flakeref.hh
+++ b/src/libexpr/flake/flakeref.hh
@@ -2,7 +2,7 @@
 
 #include "types.hh"
 #include "hash.hh"
-#include "fetchers/fetchers.hh"
+#include "fetchers.hh"
 
 #include <variant>
 
diff --git a/src/libexpr/flake/lockfile.cc b/src/libexpr/flake/lockfile.cc
index ee04ec64f7bc9868baca38cabd4dc52a76bea0f1..f73b1ac2571dbbc4f0d261fece5372849b0b51b7 100644
--- a/src/libexpr/flake/lockfile.cc
+++ b/src/libexpr/flake/lockfile.cc
@@ -1,6 +1,5 @@
 #include "lockfile.hh"
 #include "store-api.hh"
-#include "fetchers/regex.hh"
 
 #include <nlohmann/json.hpp>
 
@@ -268,7 +267,7 @@ InputPath parseInputPath(std::string_view s)
     InputPath path;
 
     for (auto & elem : tokenizeString<std::vector<std::string>>(s, "/")) {
-        if (!std::regex_match(elem, fetchers::flakeIdRegex))
+        if (!std::regex_match(elem, flakeIdRegex))
             throw Error("invalid flake input path element '%s'", elem);
         path.push_back(elem);
     }
diff --git a/src/libexpr/local.mk b/src/libexpr/local.mk
index eb7243b29ba2e11a6ba49c32ba284c3a30abf234..85cb51f34ba95c83c203f90b0afa3c27a7feb855 100644
--- a/src/libexpr/local.mk
+++ b/src/libexpr/local.mk
@@ -11,7 +11,7 @@ libexpr_SOURCES := \
   $(d)/lexer-tab.cc \
   $(d)/parser-tab.cc
 
-libexpr_LIBS = libutil libstore libnixrust
+libexpr_LIBS = libutil libstore libfetchers libnixrust
 
 libexpr_LDFLAGS =
 ifneq ($(OS), FreeBSD)
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index dd5436c04693e37658fd8cb000f12ad9a901d0ae..a30fb44b59e5a2a7d741f0632fb5a913f0c070d4 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -545,7 +545,7 @@ formal
 
 #include "eval.hh"
 #include "download.hh"
-#include "fetchers/fetchers.hh"
+#include "fetchers.hh"
 #include "store-api.hh"
 
 
diff --git a/src/libexpr/primops/fetchGit.cc b/src/libexpr/primops/fetchGit.cc
index 638c1497061d046adb79e1f50c77b38824738cec..812de9d91deb4b4faaa74de4c435e5b6ffa64cd1 100644
--- a/src/libexpr/primops/fetchGit.cc
+++ b/src/libexpr/primops/fetchGit.cc
@@ -2,8 +2,8 @@
 #include "eval-inline.hh"
 #include "store-api.hh"
 #include "hash.hh"
-#include "fetchers/fetchers.hh"
-#include "fetchers/parse.hh"
+#include "fetchers.hh"
+#include "url.hh"
 
 namespace nix {
 
@@ -48,14 +48,14 @@ static void prim_fetchGit(EvalState & state, const Pos & pos, Value * * args, Va
     if (evalSettings.pureEval && !rev)
         throw Error("in pure evaluation mode, 'fetchGit' requires a Git revision");
 
-    auto parsedUrl = fetchers::parseURL(
+    auto parsedUrl = parseURL(
         url.find("://") != std::string::npos
         ? "git+" + url
         : "git+file://" + url);
     if (ref) parsedUrl.query.insert_or_assign("ref", *ref);
     if (rev) parsedUrl.query.insert_or_assign("rev", rev->gitRev());
     // FIXME: use name
-    auto input = inputFromURL(parsedUrl);
+    auto input = fetchers::inputFromURL(parsedUrl);
 
     auto [tree, input2] = input->fetchTree(state.store);
 
diff --git a/src/libexpr/primops/fetchMercurial.cc b/src/libexpr/primops/fetchMercurial.cc
index 5d6b65c3b6a258dff1775360203b03043cfa13e1..f18351646e4c90990cbdd187a900b6d9961b8ada 100644
--- a/src/libexpr/primops/fetchMercurial.cc
+++ b/src/libexpr/primops/fetchMercurial.cc
@@ -1,9 +1,8 @@
 #include "primops.hh"
 #include "eval-inline.hh"
 #include "store-api.hh"
-#include "fetchers/fetchers.hh"
-#include "fetchers/parse.hh"
-#include "fetchers/regex.hh"
+#include "fetchers.hh"
+#include "url.hh"
 
 #include <regex>
 
@@ -31,7 +30,7 @@ static void prim_fetchMercurial(EvalState & state, const Pos & pos, Value * * ar
                 // Ugly: unlike fetchGit, here the "rev" attribute can
                 // be both a revision or a branch/tag name.
                 auto value = state.forceStringNoCtx(*attr.value, *attr.pos);
-                if (std::regex_match(value, fetchers::revRegex))
+                if (std::regex_match(value, revRegex))
                     rev = Hash(value, htSHA1);
                 else
                     ref = value;
@@ -55,14 +54,14 @@ static void prim_fetchMercurial(EvalState & state, const Pos & pos, Value * * ar
     if (evalSettings.pureEval && !rev)
         throw Error("in pure evaluation mode, 'fetchMercurial' requires a Mercurial revision");
 
-    auto parsedUrl = fetchers::parseURL(
+    auto parsedUrl = parseURL(
         url.find("://") != std::string::npos
         ? "hg+" + url
         : "hg+file://" + url);
     if (rev) parsedUrl.query.insert_or_assign("rev", rev->gitRev());
     if (ref) parsedUrl.query.insert_or_assign("ref", *ref);
     // FIXME: use name
-    auto input = inputFromURL(parsedUrl);
+    auto input = fetchers::inputFromURL(parsedUrl);
 
     auto [tree, input2] = input->fetchTree(state.store);
 
diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc
index 8e8b48fc8d57af165b78fe51b7cf0ea8f00fe4ae..035586c25e7f648a825d8b72fb9da6a154df3bdc 100644
--- a/src/libexpr/primops/fetchTree.cc
+++ b/src/libexpr/primops/fetchTree.cc
@@ -1,8 +1,8 @@
 #include "primops.hh"
 #include "eval-inline.hh"
 #include "store-api.hh"
-#include "fetchers/fetchers.hh"
-#include "fetchers/registry.hh"
+#include "fetchers.hh"
+#include "registry.hh"
 #include "download.hh"
 
 #include <ctime>
diff --git a/src/libstore/fetchers/attrs.cc b/src/libfetchers/attrs.cc
similarity index 100%
rename from src/libstore/fetchers/attrs.cc
rename to src/libfetchers/attrs.cc
diff --git a/src/libstore/fetchers/attrs.hh b/src/libfetchers/attrs.hh
similarity index 100%
rename from src/libstore/fetchers/attrs.hh
rename to src/libfetchers/attrs.hh
diff --git a/src/libstore/fetchers/cache.cc b/src/libfetchers/cache.cc
similarity index 99%
rename from src/libstore/fetchers/cache.cc
rename to src/libfetchers/cache.cc
index 14a84744a121aaf3605ad1f84a7a4d4cbe5f92ba..e1c7f3dee32a1fef70a6948fbcd7baa700cb0e64 100644
--- a/src/libstore/fetchers/cache.cc
+++ b/src/libfetchers/cache.cc
@@ -1,4 +1,4 @@
-#include "fetchers/cache.hh"
+#include "cache.hh"
 #include "sqlite.hh"
 #include "sync.hh"
 #include "store-api.hh"
diff --git a/src/libstore/fetchers/cache.hh b/src/libfetchers/cache.hh
similarity index 92%
rename from src/libstore/fetchers/cache.hh
rename to src/libfetchers/cache.hh
index a25b0598567eeca3ad27499c438c5a8ca9e2427b..d76ab12331d57282f4d37164161a438620742ab2 100644
--- a/src/libstore/fetchers/cache.hh
+++ b/src/libfetchers/cache.hh
@@ -1,7 +1,6 @@
 #pragma once
 
-#include "types.hh"
-#include "fetchers/fetchers.hh"
+#include "fetchers.hh"
 
 namespace nix::fetchers {
 
diff --git a/src/libstore/fetchers/fetchers.cc b/src/libfetchers/fetchers.cc
similarity index 99%
rename from src/libstore/fetchers/fetchers.cc
rename to src/libfetchers/fetchers.cc
index 25827ab7c22947881d8563b6ce290a6a2cb27e31..5a782a4fe091b35247e2d9d3e93ed61d6783e401 100644
--- a/src/libstore/fetchers/fetchers.cc
+++ b/src/libfetchers/fetchers.cc
@@ -1,5 +1,4 @@
 #include "fetchers.hh"
-#include "parse.hh"
 #include "store-api.hh"
 
 #include <nlohmann/json.hpp>
diff --git a/src/libstore/fetchers/fetchers.hh b/src/libfetchers/fetchers.hh
similarity index 99%
rename from src/libstore/fetchers/fetchers.hh
rename to src/libfetchers/fetchers.hh
index 5e33ec4cab86a7ddccf9da833f216a202192bd03..b75dcffa5603875f95dc6eb0281b14485c020ef6 100644
--- a/src/libstore/fetchers/fetchers.hh
+++ b/src/libfetchers/fetchers.hh
@@ -5,7 +5,7 @@
 #include "path.hh"
 #include "tree-info.hh"
 #include "attrs.hh"
-#include "parse.hh"
+#include "url.hh"
 
 #include <memory>
 
diff --git a/src/libstore/fetchers/git.cc b/src/libfetchers/git.cc
similarity index 99%
rename from src/libstore/fetchers/git.cc
rename to src/libfetchers/git.cc
index f6b7820b8503ccd5a1368545cab2375afac509e8..e578ed731a62bcd422c25b674cc2d84bd1a617eb 100644
--- a/src/libstore/fetchers/git.cc
+++ b/src/libfetchers/git.cc
@@ -1,10 +1,8 @@
-#include "fetchers/fetchers.hh"
-#include "fetchers/cache.hh"
-#include "fetchers/parse.hh"
+#include "fetchers.hh"
+#include "cache.hh"
 #include "globals.hh"
 #include "tarfile.hh"
 #include "store-api.hh"
-#include "regex.hh"
 
 #include <sys/time.h>
 
diff --git a/src/libstore/fetchers/github.cc b/src/libfetchers/github.cc
similarity index 98%
rename from src/libstore/fetchers/github.cc
rename to src/libfetchers/github.cc
index 5e34ee051d34aa605a3d5363b9c3567c1004b6ab..505af8af1722d3e5a3c9b7c59dad6a8bdbaaf557 100644
--- a/src/libstore/fetchers/github.cc
+++ b/src/libfetchers/github.cc
@@ -1,8 +1,6 @@
 #include "download.hh"
-#include "fetchers/cache.hh"
-#include "fetchers/fetchers.hh"
-#include "fetchers/parse.hh"
-#include "fetchers/regex.hh"
+#include "cache.hh"
+#include "fetchers.hh"
 #include "globals.hh"
 #include "store-api.hh"
 
diff --git a/src/libstore/fetchers/indirect.cc b/src/libfetchers/indirect.cc
similarity index 99%
rename from src/libstore/fetchers/indirect.cc
rename to src/libfetchers/indirect.cc
index 37e5afbc4e7f8f2805b67d216419c410956f3649..380b69fe07fcedfc5f932c237fae848dbfd9b1a4 100644
--- a/src/libstore/fetchers/indirect.cc
+++ b/src/libfetchers/indirect.cc
@@ -1,6 +1,4 @@
 #include "fetchers.hh"
-#include "parse.hh"
-#include "regex.hh"
 
 namespace nix::fetchers {
 
diff --git a/src/libfetchers/local.mk b/src/libfetchers/local.mk
new file mode 100644
index 0000000000000000000000000000000000000000..4f3d4e85a7196a75ee3081653918db05af254c12
--- /dev/null
+++ b/src/libfetchers/local.mk
@@ -0,0 +1,9 @@
+libraries += libfetchers
+
+libfetchers_NAME = libnixfetchers
+
+libfetchers_DIR := $(d)
+
+libfetchers_SOURCES := $(wildcard $(d)/*.cc)
+
+libfetchers_LIBS = libutil libstore libnixrust
diff --git a/src/libstore/fetchers/mercurial.cc b/src/libfetchers/mercurial.cc
similarity index 98%
rename from src/libstore/fetchers/mercurial.cc
rename to src/libfetchers/mercurial.cc
index 6fb13391bd3c582189558859d52e8059c8d7f186..4b73fbcbe6676e5aca102577be1e88f5b426d88d 100644
--- a/src/libstore/fetchers/mercurial.cc
+++ b/src/libfetchers/mercurial.cc
@@ -1,10 +1,8 @@
-#include "fetchers/fetchers.hh"
-#include "fetchers/cache.hh"
-#include "fetchers/parse.hh"
+#include "fetchers.hh"
+#include "cache.hh"
 #include "globals.hh"
 #include "tarfile.hh"
 #include "store-api.hh"
-#include "regex.hh"
 
 #include <sys/time.h>
 
diff --git a/src/libstore/fetchers/registry.cc b/src/libfetchers/registry.cc
similarity index 98%
rename from src/libstore/fetchers/registry.cc
rename to src/libfetchers/registry.cc
index 69c80a5a91d1da8ac5e46abde8e6281a8c4a30e3..34e63180ce77b1fea155a2c3fb45911bc9d55775 100644
--- a/src/libstore/fetchers/registry.cc
+++ b/src/libfetchers/registry.cc
@@ -1,5 +1,5 @@
-#include "fetchers/registry.hh"
-#include "fetchers/fetchers.hh"
+#include "registry.hh"
+#include "fetchers.hh"
 #include "util.hh"
 #include "globals.hh"
 #include "download.hh"
diff --git a/src/libstore/fetchers/registry.hh b/src/libfetchers/registry.hh
similarity index 100%
rename from src/libstore/fetchers/registry.hh
rename to src/libfetchers/registry.hh
diff --git a/src/libstore/fetchers/tarball.cc b/src/libfetchers/tarball.cc
similarity index 98%
rename from src/libstore/fetchers/tarball.cc
rename to src/libfetchers/tarball.cc
index 55244b30e5dca13f0bd5ab8684875612c7314ef0..b0a83001ec6ad51aa7a2cf8869bad4bf46eb8cbf 100644
--- a/src/libstore/fetchers/tarball.cc
+++ b/src/libfetchers/tarball.cc
@@ -1,6 +1,5 @@
-#include "fetchers/fetchers.hh"
-#include "fetchers/parse.hh"
-#include "fetchers/cache.hh"
+#include "fetchers.hh"
+#include "cache.hh"
 #include "download.hh"
 #include "globals.hh"
 #include "store-api.hh"
diff --git a/src/libstore/fetchers/tree-info.hh b/src/libfetchers/tree-info.hh
similarity index 100%
rename from src/libstore/fetchers/tree-info.hh
rename to src/libfetchers/tree-info.hh
diff --git a/src/libstore/fetchers/parse.hh b/src/libstore/fetchers/parse.hh
deleted file mode 100644
index 45d5182b0e5204352391886c178566715adbf4ba..0000000000000000000000000000000000000000
--- a/src/libstore/fetchers/parse.hh
+++ /dev/null
@@ -1,30 +0,0 @@
-#pragma once
-
-#include "types.hh"
-
-namespace nix::fetchers {
-
-struct ParsedURL
-{
-    std::string url;
-    std::string base; // URL without query/fragment
-    std::string scheme;
-    std::optional<std::string> authority;
-    std::string path;
-    std::map<std::string, std::string> query;
-    std::string fragment;
-
-    std::string to_string() const;
-
-    bool operator ==(const ParsedURL & other) const;
-};
-
-MakeError(BadURL, Error);
-
-std::string percentDecode(std::string_view in);
-
-std::map<std::string, std::string> decodeQuery(const std::string & query);
-
-ParsedURL parseURL(const std::string & url);
-
-}
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 66a9d9fb50af77cdcde11496acfca141d33b64e3..e5282bb3057fc935494099eb438f9746a6e59062 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -6,7 +6,7 @@
 #include "thread-pool.hh"
 #include "json.hh"
 #include "derivations.hh"
-#include "fetchers/parse.hh"
+#include "url.hh"
 
 #include <future>
 
@@ -867,7 +867,7 @@ std::pair<std::string, Store::Params> splitUriAndParams(const std::string & uri_
     Store::Params params;
     auto q = uri.find('?');
     if (q != std::string::npos) {
-        params = fetchers::decodeQuery(uri.substr(q + 1));
+        params = decodeQuery(uri.substr(q + 1));
         uri = uri_.substr(0, q);
     }
     return {uri, params};
diff --git a/src/libstore/fetchers/parse.cc b/src/libutil/url.cc
similarity index 98%
rename from src/libstore/fetchers/parse.cc
rename to src/libutil/url.cc
index a5ad14c8728654e89320af842abab34a58e41d6e..5d5328e5de600d62da907990c4cc6c6063e3885a 100644
--- a/src/libstore/fetchers/parse.cc
+++ b/src/libutil/url.cc
@@ -1,8 +1,7 @@
-#include "parse.hh"
+#include "url.hh"
 #include "util.hh"
-#include "regex.hh"
 
-namespace nix::fetchers {
+namespace nix {
 
 std::regex refRegex(refRegexS, std::regex::ECMAScript);
 std::regex revRegex(revRegexS, std::regex::ECMAScript);
diff --git a/src/libstore/fetchers/regex.hh b/src/libutil/url.hh
similarity index 75%
rename from src/libstore/fetchers/regex.hh
rename to src/libutil/url.hh
index e0989edfcfec15415d3f6a965f5966e9b8e09404..1503023a2fc6a63c8988dc9b27320c3267022135 100644
--- a/src/libstore/fetchers/regex.hh
+++ b/src/libutil/url.hh
@@ -1,8 +1,33 @@
 #pragma once
 
+#include "types.hh"
+
 #include <regex>
 
-namespace nix::fetchers {
+namespace nix {
+
+struct ParsedURL
+{
+    std::string url;
+    std::string base; // URL without query/fragment
+    std::string scheme;
+    std::optional<std::string> authority;
+    std::string path;
+    std::map<std::string, std::string> query;
+    std::string fragment;
+
+    std::string to_string() const;
+
+    bool operator ==(const ParsedURL & other) const;
+};
+
+MakeError(BadURL, Error);
+
+std::string percentDecode(std::string_view in);
+
+std::map<std::string, std::string> decodeQuery(const std::string & query);
+
+ParsedURL parseURL(const std::string & url);
 
 // URI stuff.
 const static std::string pctEncoded = "(?:%[0-9a-fA-F][0-9a-fA-F])";
diff --git a/src/nix-channel/nix-channel.cc b/src/nix-channel/nix-channel.cc
index 8b0937c53273d3b29799c78843850b803ea6b3f5..17f7c149f6e0973daf2f735505fd7a397f53a77f 100755
--- a/src/nix-channel/nix-channel.cc
+++ b/src/nix-channel/nix-channel.cc
@@ -3,7 +3,7 @@
 #include "download.hh"
 #include "store-api.hh"
 #include "legacy.hh"
-#include "fetchers/fetchers.hh"
+#include "fetchers.hh"
 
 #include <fcntl.h>
 #include <regex>
diff --git a/src/nix/flake.cc b/src/nix/flake.cc
index e5aa424b57ffa63e0c66a036136993344d854180..2cc61932d6b82c17116e8ebcd6c0be4c9255cc50 100644
--- a/src/nix/flake.cc
+++ b/src/nix/flake.cc
@@ -9,8 +9,8 @@
 #include "store-api.hh"
 #include "derivations.hh"
 #include "attr-path.hh"
-#include "fetchers/fetchers.hh"
-#include "fetchers/registry.hh"
+#include "fetchers.hh"
+#include "registry.hh"
 #include "json.hh"
 
 #include <nlohmann/json.hpp>
diff --git a/src/nix/installables.cc b/src/nix/installables.cc
index 64ea1e000a3981a680ec44d70d5372e7795ee378..99bbe9769f5a0e39233d939f2445d80c6a3bc90e 100644
--- a/src/nix/installables.cc
+++ b/src/nix/installables.cc
@@ -10,7 +10,7 @@
 #include "shared.hh"
 #include "flake/flake.hh"
 #include "flake/eval-cache.hh"
-#include "fetchers/parse.hh"
+#include "url.hh"
 
 #include <regex>
 #include <queue>
diff --git a/src/nix/local.mk b/src/nix/local.mk
index 6483000db39a33468e4a09b82b04bc428df875e4..622f490196c6129bc56d8be8835ea68119259496 100644
--- a/src/nix/local.mk
+++ b/src/nix/local.mk
@@ -15,7 +15,7 @@ nix_SOURCES := \
   $(wildcard src/nix-prefetch-url/*.cc) \
   $(wildcard src/nix-store/*.cc) \
 
-nix_LIBS = libexpr libmain libstore libutil libnixrust
+nix_LIBS = libexpr libmain libfetchers libstore libutil libnixrust
 
 nix_LDFLAGS = -pthread $(SODIUM_LIBS) $(EDITLINE_LIBS) $(BOOST_LDFLAGS) -lboost_context -lboost_thread -lboost_system