From 61d996c00c7a7a8d193b84bdb8073b272013c4ab Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Wed, 31 Jul 2024 19:18:26 +0100 Subject: [PATCH] Never copy nix store path to nix store Fixes #11228 --- src/libfetchers/path.cc | 2 +- src/libflake/flake/flake.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libfetchers/path.cc b/src/libfetchers/path.cc index fca0df84b107..2a0d6c9dc5ba 100644 --- a/src/libfetchers/path.cc +++ b/src/libfetchers/path.cc @@ -150,7 +150,7 @@ struct PathInputScheme : InputScheme store->addTempRoot(*storePath); time_t mtime = 0; - if (!storePath || storePath->name() != "source" || !store->isValidPath(*storePath)) { + if (!storePath || !store->isValidPath(*storePath)) { // FIXME: try to substitute storePath. auto src = sinkToSource([&](Sink & sink) { mtime = dumpPathAndGetMtime(absPath, sink, defaultPathFilter); diff --git a/src/libflake/flake/flake.cc b/src/libflake/flake/flake.cc index 627dfe83093c..9be2e3d40bc5 100644 --- a/src/libflake/flake/flake.cc +++ b/src/libflake/flake/flake.cc @@ -72,7 +72,7 @@ static std::tuple fetchOrSubstituteTree( state.allowPath(storePath); - assert(!originalRef.input.getNarHash() || storePath == originalRef.input.computeStorePath(*state.store)); + //assert(!originalRef.input.getNarHash() || storePath == originalRef.input.computeStorePath(*state.store)); return {std::move(storePath), resolvedRef, lockedRef}; }