mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "terraform-ls";
|
|
version = "0.39.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hashicorp";
|
|
repo = "terraform-ls";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-cZjK2c1v/6v5klcSBNnDmIVditGn6Dm6PTizv0Up30w=";
|
|
};
|
|
|
|
vendorHash = "sha256-8Gy4MlGrE0zs/MkB6wopYPa0nM86BxeaUHpgGxjtksQ=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
];
|
|
|
|
# There's a mixture of tests that use networking and several that fail on aarch64
|
|
doCheck = false;
|
|
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
$out/bin/terraform-ls --help
|
|
$out/bin/terraform-ls --version | grep "${finalAttrs.version}"
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
meta = {
|
|
description = "Terraform Language Server (official)";
|
|
mainProgram = "terraform-ls";
|
|
homepage = "https://github.com/hashicorp/terraform-ls";
|
|
changelog = "https://github.com/hashicorp/terraform-ls/blob/v${finalAttrs.version}/CHANGELOG.md";
|
|
license = lib.licenses.mpl20;
|
|
maintainers = with lib.maintainers; [
|
|
mbaillie
|
|
jk
|
|
];
|
|
};
|
|
})
|