@@ -10,9 +10,9 @@ let
1010 preferLocalBuild = true;
1111 } ''
1212 cd ${srcStr}
13− ROOT=$(git rev-parse --show-toplevel) # path to repo
13+ DOT_GIT=$(git rev-parse --resolve-git-dir .git) # path to repo
1414
15− cp $ROOT/.git/index $ROOT/.git/index-user # backup index
15+ cp $DOT_GIT/index $DOT_GIT/index-user # backup index
1616 git reset # reset index
1717 git add . # add current directory
1818
@@ -21,7 +21,7 @@ let
2121 git rev-parse $(git write-tree) \
2222 | tr -d '\n' > $out
2323
24− mv $ROOT/.git/index-user $ROOT/.git/index # restore index
24+ mv $DOT_GIT/index-user $DOT_GIT/index # restore index
2525 '';
2626
2727 gitHash = builtins.readFile gitHashFile; # cache against git hash