diff --git a/src/libexpr/paths.cc b/src/libexpr/paths.cc index 56b740830..61c4d4100 100644 --- a/src/libexpr/paths.cc +++ b/src/libexpr/paths.cc @@ -21,7 +21,7 @@ std::string EvalState::encodePath(const SourcePath & path) to /nix/store/virtual000...) and we should deprecate it eventually. So print a warning about use of an encoded path in decodePath(). */ - return path.accessor == rootFS + return path.accessor == ref(rootFS) ? path.path.abs() : fmt("%s%08x-source%s", virtualPathMarker, path.accessor->number, path.path.absOrEmpty()); } diff --git a/src/libfetchers/fetchers.hh b/src/libfetchers/fetchers.hh index 1b06e34b1..3e32607f9 100644 --- a/src/libfetchers/fetchers.hh +++ b/src/libfetchers/fetchers.hh @@ -8,7 +8,7 @@ #include -namespace nix { class Store; class StorePath; class InputAccessor; } +namespace nix { class Store; class StorePath; struct InputAccessor; } namespace nix::fetchers { diff --git a/src/libfetchers/mercurial.cc b/src/libfetchers/mercurial.cc index cb7122eeb..b35c7580f 100644 --- a/src/libfetchers/mercurial.cc +++ b/src/libfetchers/mercurial.cc @@ -113,7 +113,7 @@ struct MercurialInputScheme : InputScheme const Input & input, const CanonPath & path, std::string_view contents, - std::optional commitMsg) const + std::optional commitMsg) const override { auto [isLocal, repoPath] = getActualUrl(input); if (!isLocal) diff --git a/src/libfetchers/path.cc b/src/libfetchers/path.cc index 96e34af79..e25be69f2 100644 --- a/src/libfetchers/path.cc +++ b/src/libfetchers/path.cc @@ -96,7 +96,7 @@ struct PathInputScheme : InputScheme const Input & input, const CanonPath & path, std::string_view contents, - std::optional commitMsg) const + std::optional commitMsg) const override { auto absPath = CanonPath(getAbsPath(input)) + path;