From 589d4ff232665582b46730f0bf99a571e76eed7e Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 12 Oct 2019 12:00:00 -0500 Subject: 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 --- pkgs/development/go-modules/generic/default.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkgs/development/go-modules') 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 -- cgit 1.4.1