aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2024-06-23 15:51:34 +0000
committerGerrit Code Review <gerrit@localhost>2024-06-23 15:51:34 +0000
commit5f0062285c4b39cdf59ca09b46121a8eba771c1b (patch)
treec2def54df41da619a130f2fa9b6a91c8ecbebdfb /src/libexpr
parentce6cb14995e869cfea395570ccb300b0369c72dc (diff)
parent35eec921af1043fc6322edc0ad88c872d41623b8 (diff)
Merge "libfetchers: make attribute / URL query handling consistent" into main
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/flake/flakeref.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libexpr/flake/flakeref.cc b/src/libexpr/flake/flakeref.cc
index 1c90bfc43..8668961fe 100644
--- a/src/libexpr/flake/flakeref.cc
+++ b/src/libexpr/flake/flakeref.cc
@@ -204,7 +204,13 @@ std::pair<FlakeRef, std::string> parseFlakeRefWithFragment(
std::string fragment;
std::swap(fragment, parsedURL.fragment);
- auto input = Input::fromURL(parsedURL, isFlake);
+ // This has a special meaning for flakes and must not be passed to libfetchers.
+ // Of course this means that libfetchers cannot have fetchers
+ // expecting an argument `dir` 🫠
+ ParsedURL urlForFetchers(parsedURL);
+ urlForFetchers.query.erase("dir");
+
+ auto input = Input::fromURL(urlForFetchers, isFlake);
input.parent = baseDir;
return std::make_pair(