diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2019-10-12 12:00:00 -0500 |
---|---|---|
committer | Mario Rodas <marsam@users.noreply.github.com> | 2019-10-12 12:00:00 -0500 |
commit | 589d4ff232665582b46730f0bf99a571e76eed7e (patch) | |
tree | fd446df808603f2b3fa29ce7db65cac33765789c | |
parent | c7e1fde9dc0fa17fb09301f8db352bec7e54fac0 (diff) |
buildGoModule: remove cached lookup results and tiles
Since GO 1.13, the go command caches the lookup results and tiles in $GOPATH[1], hence making the module directory non-deterministic. Use the `-f` flag when removing /sumdb, for compatibility with Go 1.12 because in that version does not exists that directory. [1] https://go.googlesource.com/proposal/+/master/design/25530-sumdb.md#command-client
-rw-r--r-- | pkgs/development/go-modules/generic/default.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 55fda78b03e30..9adebe512471b 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -73,6 +73,8 @@ let installPhase = args.modInstallPhase or '' runHook preInstall + # remove cached lookup results and tiles + rm -rf "''${GOPATH}/pkg/mod/cache/download/sumdb" cp -r "''${GOPATH}/pkg/mod/cache/download" $out runHook postInstall |