depot/pkgs/by-name/go/gopls/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

33 lines
982 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "gopls";
version = "0.16.2";
src = fetchFromGitHub {
owner = "golang";
repo = "tools";
rev = "gopls/v${version}";
hash = "sha256-amy00VMUcmyjDoZ4d9/+YswfcZ+1/cGvFsA4sAmc1dA=";
};
modRoot = "gopls";
vendorHash = "sha256-ta94xPboFtSxFeuMtPX76XiC1O7osNl4oLk64wIyyz4=";
# 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";
};
}