fix: nix build environment fixes

- flake.nix: add capnpc source override (ghfast.top proxy)
- flake.nix: add GOROOT to devShell for Go version consistency
- tools/go_build: support file:// GOPROXY for sandbox builds
- bcctool: add .gitignore for gomodcache/
- bcctool: go.mod updated by go mod download

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
lei.chen 2026-07-24 07:03:18 +00:00
parent cae4ef0cc7
commit 98066db68d
4 changed files with 18 additions and 3 deletions

View file

@ -99,4 +99,9 @@ done
export GOPROXY=https://goproxy.cn
# Use pre-downloaded Go module cache if available (avoids network inside sandbox)
if [ -d "$_sdir/gomodcache/pkg/mod/cache/download" ]; then
export GOPROXY="file://${_sdir}/gomodcache/pkg/mod/cache/download,off"
fi
(cd $_sdir; go build -gcflags "all=-N -l" -o "$_dfile" "$_sfile")