From f0c032a4ae626d9b8d6f9e8fedfe1fe9ba299d03 Mon Sep 17 00:00:00 2001 From: Roman Gonzalez Date: Tue, 2 Jun 2020 11:31:54 -0700 Subject: [PATCH] gotools: update comments regarding gopls The replaced comment was stating some properties about upstream source code that are no longer the case. The new comment mentions what's the current situation in regards to the gopls binary. --- pkgs/development/tools/gotools/default.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/gotools/default.nix b/pkgs/development/tools/gotools/default.nix index a7858474a42..7724f5b34fe 100644 --- a/pkgs/development/tools/gotools/default.nix +++ b/pkgs/development/tools/gotools/default.nix @@ -11,12 +11,16 @@ buildGoModule rec { sha256 = "0a8c7j4w784w441j3j3bh640vy1g6g214641qv485wyi0xj49anf"; }; - # Build of golang.org/x/tools/gopls fails with: - # can't load package: package golang.org/x/tools/gopls: unknown import path "golang.org/x/tools/gopls": cannot find module providing package golang.org/x/tools/gopls - # That is most probably caused by golang.org/x/tools/gopls containing a separate Go module. - # In order to fix this, we simply remove the module. - # Note that build of golang.org/x/tools/cmd/gopls provides identical binary as golang.org/x/tools/gopls. - # See https://github.com/NixOS/nixpkgs/pull/64335. + # The gopls folder has its own module definition which causes a build failure. + # Given that, we can't have the gopls binary be part of the gotools + # derivation. + # + # We have a seperate derivation to build the gopls tool. + # + # Related + # + # * https://github.com/NixOS/nixpkgs/pull/85868 + # * https://github.com/NixOS/nixpkgs/issues/88716 postPatch = '' rm -rf gopls ''; @@ -47,4 +51,4 @@ buildGoModule rec { # Do not copy this without a good reason for enabling # In this case tools is heavily coupled with go itself and embeds paths. allowGoReference = true; -} \ No newline at end of file +}