depot/third_party/nixpkgs/pkgs/development/tools/language-servers/gopls/default.nix
Default email 83627f9931 Project import generated by Copybara.
GitOrigin-RevId: 2893f56de08021cffd9b6b6dfc70fd9ccd51eb60
2024-06-24 14:47:55 -04:00

33 lines
982 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "gopls";
version = "0.16.0";
src = fetchFromGitHub {
owner = "golang";
repo = "tools";
rev = "gopls/v${version}";
hash = "sha256-X5XBYTD+DIbHFBMWkLGosZUORexYt83mML/akUzrnFk=";
};
modRoot = "gopls";
vendorHash = "sha256-XH3kSfnlwmbOLkWJCjKmU1ghCkarn23M0q0vJQHkCe0=";
# https://github.com/golang/tools/blob/9ed98faa/gopls/main.go#L27-L30
ldflags = [ "-X main.version=v${version}" ];
doCheck = false;
# Only build gopls, and not the integration tests or documentation generator.
subPackages = [ "." ];
meta = with lib; {
description = "Official language server for the Go language";
homepage = "https://github.com/golang/tools/tree/master/gopls";
changelog = "https://github.com/golang/tools/releases/tag/${src.rev}";
license = licenses.bsd3;
maintainers = with maintainers; [ mic92 rski SuperSandro2000 zimbatm ];
mainProgram = "gopls";
};
}