Merge pull request #89372 from roman/88716/documentation-changes

gotools: update comments regarding gopls
This commit is contained in:
Doron Behar 2020-09-11 12:12:21 +03:00 committed by GitHub
commit 6d4b93323e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,12 +11,16 @@ buildGoModule rec {
sha256 = "0a8c7j4w784w441j3j3bh640vy1g6g214641qv485wyi0xj49anf"; sha256 = "0a8c7j4w784w441j3j3bh640vy1g6g214641qv485wyi0xj49anf";
}; };
# Build of golang.org/x/tools/gopls fails with: # The gopls folder contains a Go submodule which causes a build failure.
# 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 # Given that, we can't have the gopls binary be part of the gotools
# That is most probably caused by golang.org/x/tools/gopls containing a separate Go module. # derivation.
# 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. # The attribute "gopls" provides the gopls binary.
# See https://github.com/NixOS/nixpkgs/pull/64335. #
# Related
#
# * https://github.com/NixOS/nixpkgs/pull/85868
# * https://github.com/NixOS/nixpkgs/issues/88716
postPatch = '' postPatch = ''
rm -rf gopls rm -rf gopls
''; '';