about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2023-10-05 14:40:32 +0200
committerAlyssa Ross <hi@alyssa.is>2023-10-05 13:54:00 +0000
commit025a028c471a1c2ae88bd846bdf25f74b9c29529 (patch)
treeb164a8b92ce636f9bbafc1a1bd170244fca2aa48 /pkgs/build-support
parent8c72f651b51d761ad38d56fdac920946e46dffb9 (diff)
downloadnixlib-025a028c471a1c2ae88bd846bdf25f74b9c29529.tar
nixlib-025a028c471a1c2ae88bd846bdf25f74b9c29529.tar.gz
nixlib-025a028c471a1c2ae88bd846bdf25f74b9c29529.tar.bz2
nixlib-025a028c471a1c2ae88bd846bdf25f74b9c29529.tar.lz
nixlib-025a028c471a1c2ae88bd846bdf25f74b9c29529.tar.xz
nixlib-025a028c471a1c2ae88bd846bdf25f74b9c29529.tar.zst
nixlib-025a028c471a1c2ae88bd846bdf25f74b9c29529.zip
fetchgit: fix private fetching via netrc
This fixes a regression introduced in https://github.com/NixOS/nixpkgs/pull/256628
which broke fetching with private = true through a netrc file.
Tested locally with a really special github enterprise.
Diffstat (limited to 'pkgs/build-support')
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index 1194b39dafd7..8e3fe456e681 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -417,6 +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/"
 unset XDG_CONFIG_HOME
 export GIT_CONFIG_NOSYSTEM=1