From c5733e7a0933b62144e17947176ebd2e871b4616 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 1 Dec 2019 16:20:00 -0500 Subject: [PATCH] buildGoModule: disable consult the checksum database on build Since Go 1.13, `GOSUMDB` defaults to "sum.golang.org", to consult the checksum database of the main module's go.sum. We already use the default behavior when building `go-modules`, but Go tries to consult the checksum database again when building the module, and fails because since it requires `cacert` and `git` which are not propagated when building the package. --- pkgs/development/go-modules/generic/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 9adebe512471..55eaca514da8 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -98,6 +98,7 @@ let export GOCACHE=$TMPDIR/go-cache export GOPATH="$TMPDIR/go" + export GOSUMDB=off export GOPROXY=file://${go-modules} runHook postConfigure