depot/third_party/nixpkgs/pkgs/by-name/go/gopls/package.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

33 lines
982 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "gopls";
version = "0.16.1";
src = fetchFromGitHub {
owner = "golang";
repo = "tools";
rev = "gopls/v${version}";
hash = "sha256-4RpQrlFj0stefVBouxyYN3Pf0PkYZ4cn4IKIskqUhVY=";
};
modRoot = "gopls";
vendorHash = "sha256-D+ew0XyHRns1i9KAdV5vhCs3Uu338EujYjwU6IIZ8OY=";
# 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";
};
}