And handle relative 'git+file:' flakerefs while we're at it (these
crashed with an assertion failure).
Fixes#12248.
(cherry picked from commit ff8e2fe84e)
Commands like `nix flake metadata '.?submodules=1'` ignored the query
part of the URL, while `nix build '.?submodules=1#foo'` did work
correctly because of the presence of the fragment part.
(cherry picked from commit 28caa35a97)
This prevents a 'url' field that is out of sync with the other
fields. You can use to_string() to get the full URL.
(cherry picked from commit f705ce7f9a)
This factors out some commonality in calling fromURL() and handling
the "dir" parameter into a fromParsedURL() helper function.
(cherry picked from commit 850281908c)
Known behavior changes:
- `MemorySourceAccessor`'s comparison operators no longer forget to
compare the `SourceAccessor` base class.
Progress on #10832
What remains for that issue is hopefully much easier!
Progress on #5638
There are still a global fetcher and eval settings, but they are pushed
down into `libnixcmd`, which is a lot less bad a place for this sort of
thing.
Continuing process pioneered in
52bfccf8d8.