git.iko.soy/typeable/nixpkgs
on master help sign in
buildGoModule: fix vendor conditional, set GOPROXY unconditionally

with sandboxing disabled this could still access the network

commitb6aa99a8d2a1eadecb13c4e1887489c4850cfb09 authorzowoq <59103226+zowoq@users.noreply.github.com> dateWed 16 Mar 2022, 21:40 (5 years ago) parent5117b2e
1 file changed+2−2
pkgs/development/go-modules/generic/default.nix+2−2
pkgs/development/go-modules/generic/default.nix+2−2
@@ -153,13 +153,13 @@ let
153153
154154 export GOCACHE=$TMPDIR/go-cache
155155 export GOPATH="$TMPDIR/go"
156+ export GOPROXY=off
156157 export GOSUMDB=off
157158 cd "$modRoot"
158− '' + lib.optionalString (go-modules != "") ''
159+ '' + lib.optionalString (vendorSha256 != null) ''
159160 ${if proxyVendor then ''
160161 export GOPROXY=file://${go-modules}
161162 '' else ''
162− export GOPROXY=off
163163 rm -rf vendor
164164 cp -r --reflink=auto ${go-modules} vendor
165165 ''}