Skip to content

Commit

Permalink
Never copy nix store path to nix store
Browse files Browse the repository at this point in the history
  • Loading branch information
yshui committed Aug 7, 2024
1 parent 13f8cc2 commit 61d996c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libfetchers/path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/libflake/flake/flake.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static std::tuple<StorePath, FlakeRef, FlakeRef> 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};
}
Expand Down

0 comments on commit 61d996c

Please sign in to comment.