fetchgit: use $NIX_BUILD_TOP instead of hardcoding /build/

Co-authored-by: Bjørn Forsman <133602+bjornfor@users.noreply.github.com>

Changed files
+1 -1
pkgs
build-support
fetchgit
+1 -1
pkgs/build-support/fetchgit/nix-prefetch-git
···
tmpHomePath="$(mktemp -d "${TMPDIR:-/tmp}/nix-prefetch-git-tmp-home-XXXXXXXXXX")"
exit_handlers+=(remove_tmpHomePath)
HOME="$tmpHomePath"
-
ln -s /build/.netrc "$HOME/"
unset XDG_CONFIG_HOME
export GIT_CONFIG_NOSYSTEM=1
···
tmpHomePath="$(mktemp -d "${TMPDIR:-/tmp}/nix-prefetch-git-tmp-home-XXXXXXXXXX")"
exit_handlers+=(remove_tmpHomePath)
HOME="$tmpHomePath"
+
ln -s "$NIX_BUILD_TOP/.netrc" "$HOME/"
unset XDG_CONFIG_HOME
export GIT_CONFIG_NOSYSTEM=1