diff options
author | zowoq <59103226+zowoq@users.noreply.github.com> | 2022-03-16 21:40:15 +1000 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2022-03-17 21:24:58 +1000 |
commit | b6aa99a8d2a1eadecb13c4e1887489c4850cfb09 (patch) | |
tree | 45b6061dbc99056974e2013d8ff299da968ce1e4 /pkgs/development/go-modules | |
parent | 5117b2ee8cf6cbc5a4aae23151afe7710e4ab61d (diff) |
buildGoModule: fix vendor conditional, set GOPROXY unconditionally
with sandboxing disabled this could still access the network
Diffstat (limited to 'pkgs/development/go-modules')
-rw-r--r-- | pkgs/development/go-modules/generic/default.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index ace8b820ee235..f986d164ee8c2 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -153,13 +153,13 @@ let export GOCACHE=$TMPDIR/go-cache export GOPATH="$TMPDIR/go" + export GOPROXY=off export GOSUMDB=off cd "$modRoot" - '' + lib.optionalString (go-modules != "") '' + '' + lib.optionalString (vendorSha256 != null) '' ${if proxyVendor then '' export GOPROXY=file://${go-modules} '' else '' - export GOPROXY=off rm -rf vendor cp -r --reflink=auto ${go-modules} vendor ''} |