gomod2nix icon indicating copy to clipboard operation
gomod2nix copied to clipboard

feat: add netrcFile and goModFile parameters for private modules and IFD avoidance

Open aaomidi opened this issue 4 weeks ago • 1 comments

Adds support for authenticated private module fetches via netrc:

  • New netrcFile parameter in buildGoApplication and fetchGoModule
  • Reads netrc file at eval time, passes content to fetch.sh
  • fetch.sh writes netrc to $HOME/.netrc for go mod download

Adds goModFile parameter to avoid IFD when pwd is a derivation:

  • When pwd points to a derivation output, reading go.mod forces IFD
  • goModFile allows passing a raw path that's copied at eval time
  • Removes pathExists check which also caused IFD issues

Users can pass GOPROXY as an impure env var to use a custom proxy.

aaomidi avatar Dec 19 '25 16:12 aaomidi