buildGoPackage: disable module-mode

Go 1.13 slightly changed the behavior GO111MODULE=auto [1], which might
accidentally cause the go command to build the module, for instance in
the checkPhase:

    [GO111MODULE=auto] activates the module-aware mode of the go command
    whenever the current working directory contains, or is below a
    directory containing, a go.mod file — even if the current directory
    is within GOPATH/src.

[1] https://golang.org/doc/go1.13#proxy-vars
wip/yesman
Mario Rodas 5 years ago committed by Frederik Rietdijk
parent 868972f294
commit 46abdee40b
  1. 2
      pkgs/development/go-packages/generic/default.nix

@ -84,6 +84,8 @@ let
GOHOSTARCH = go.GOHOSTARCH or null;
GOHOSTOS = go.GOHOSTOS or null;
GO111MODULE = "off";
GOARM = toString (stdenv.lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
configurePhase = args.configurePhase or ''

Loading…
Cancel
Save