From 7a450a8ba97bc7521b850de66366c7202d45a111 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 2 Jun 2025 14:08:42 -0400 Subject: [PATCH] Update src/libexpr/paths.cc --- src/libexpr/paths.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libexpr/paths.cc b/src/libexpr/paths.cc index e7dfa549c..cbe557033 100644 --- a/src/libexpr/paths.cc +++ b/src/libexpr/paths.cc @@ -57,9 +57,10 @@ std::string EvalState::computeBaseName(const SourcePath & path, PosIdx pos) if (path.accessor == rootFS) { if (auto storePath = store->maybeParseStorePath(path.path.abs())) { warn( - "Performing inefficient double copy of path '%s' to the store at %s. " - "This can typically be avoided by rewriting an attribute like `src = ./.` " - "to `src = builtins.path { path = ./.; name = \"source\"; }`.", + "Copying '%s' to the store again\n" + "You can make Nix evaluate faster and copy fewer files by replacing `./.` with the `self` flake input, " + "or `builtins.path { path = ./.; name = \"source\"; }`\n\n" + "Location: %s\n", path, positions[pos]); return std::string(fetchToStore(*store, path, FetchMode::DryRun, storePath->name()).to_string());