1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-14 14:32:42 +01:00

Update src/libexpr/paths.cc

This commit is contained in:
Graham Christensen 2025-06-02 14:08:42 -04:00 committed by GitHub
parent 3e45b40d66
commit 7a450a8ba9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -57,9 +57,10 @@ std::string EvalState::computeBaseName(const SourcePath & path, PosIdx pos)
if (path.accessor == rootFS) { if (path.accessor == rootFS) {
if (auto storePath = store->maybeParseStorePath(path.path.abs())) { if (auto storePath = store->maybeParseStorePath(path.path.abs())) {
warn( warn(
"Performing inefficient double copy of path '%s' to the store at %s. " "Copying '%s' to the store again\n"
"This can typically be avoided by rewriting an attribute like `src = ./.` " "You can make Nix evaluate faster and copy fewer files by replacing `./.` with the `self` flake input, "
"to `src = builtins.path { path = ./.; name = \"source\"; }`.", "or `builtins.path { path = ./.; name = \"source\"; }`\n\n"
"Location: %s\n",
path, path,
positions[pos]); positions[pos]);
return std::string(fetchToStore(*store, path, FetchMode::DryRun, storePath->name()).to_string()); return std::string(fetchToStore(*store, path, FetchMode::DryRun, storePath->name()).to_string());