Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericson2314 committed Jan 22, 2025
1 parent 64a3899 commit 7d9c1a2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstore/unix/build/local-derivation-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2565,7 +2565,7 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
case FileIngestionMethod::Git: {
return git::dumpHash(
outputHash.hashAlgo,
{getFSSourceAccessor(), CanonPath(tmpDir + "/tmp")}).hash;
{getFSSourceAccessor(), CanonPath(actualPath)}).hash;
}
}
assert(false);
Expand Down
3 changes: 3 additions & 0 deletions tests/functional/fixed.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@ rec {

# Can use "nar" instead of "recursive" now.
nar-not-recursive = f2 "foo" ./fixed.builder2.sh "nar" "md5" "3670af73070fa14077ad74e0f5ea4e42";

# Experimental feature
git = f2 "foo" ./fixed.builder2.sh "git" "sha1" "3670af73070fa14077ad74e0f5ea4e42";
}
3 changes: 3 additions & 0 deletions tests/functional/git-hashing/fixed.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source common.sh

nix-build ../fixed.nix -A git --no-out-link
1 change: 1 addition & 0 deletions tests/functional/git-hashing/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ suites += {
'deps': [],
'tests': [
'simple.sh',
'fixed.sh',
],
'workdir': meson.current_source_dir(),
}

0 comments on commit 7d9c1a2

Please sign in to comment.