fetchgit: use $NIX_BUILD_TOP instead of hardcoding /build/

Co-authored-by: Bjørn Forsman <133602+bjornfor@users.noreply.github.com>
This commit is contained in:
Sandro Jäckel 2023-10-07 21:47:54 +02:00 committed by Bjørn Forsman
parent e33a864e24
commit d09cd1d7d1

View File

@ -417,7 +417,7 @@ fi
tmpHomePath="$(mktemp -d "${TMPDIR:-/tmp}/nix-prefetch-git-tmp-home-XXXXXXXXXX")"
exit_handlers+=(remove_tmpHomePath)
HOME="$tmpHomePath"
ln -s /build/.netrc "$HOME/"
ln -s "$NIX_BUILD_TOP/.netrc" "$HOME/"
unset XDG_CONFIG_HOME
export GIT_CONFIG_NOSYSTEM=1