2023-07-08 02:14:59 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2020-06-12 10:35:06 +00:00
|
|
|
|
2020-11-03 00:39:40 +00:00
|
|
|
buildGoModule rec {
|
2020-06-12 10:35:06 +00:00
|
|
|
pname = "terraform-ls";
|
2024-01-17 04:20:00 +00:00
|
|
|
version = "0.32.5";
|
2020-06-12 10:35:06 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-01-17 04:20:00 +00:00
|
|
|
hash = "sha256-ywqxme/dsMwREvgLa2iLaibYzXHqgXR4OO8V8UiSSjw=";
|
2020-06-12 10:35:06 +00:00
|
|
|
};
|
|
|
|
|
2024-01-17 04:20:00 +00:00
|
|
|
vendorHash = "sha256-+6yO4gQmMNzl/rMWWQnyhepEI5miSCyolOQxQXWqGng=";
|
2023-07-08 02:14:59 +00:00
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
2020-11-03 00:39:40 +00:00
|
|
|
|
2021-08-02 13:13:42 +00:00
|
|
|
# There's a mixture of tests that use networking and several that fail on aarch64
|
|
|
|
doCheck = false;
|
2021-06-13 11:39:15 +00:00
|
|
|
|
2021-08-02 13:13:42 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
$out/bin/terraform-ls --help
|
2023-07-08 02:14:59 +00:00
|
|
|
$out/bin/terraform-ls --version | grep "${version}"
|
2021-08-02 13:13:42 +00:00
|
|
|
runHook postInstallCheck
|
2021-06-10 18:09:10 +00:00
|
|
|
'';
|
2020-06-12 10:35:06 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Terraform Language Server (official)";
|
|
|
|
homepage = "https://github.com/hashicorp/terraform-ls";
|
2021-06-10 18:09:10 +00:00
|
|
|
changelog = "https://github.com/hashicorp/terraform-ls/blob/v${version}/CHANGELOG.md";
|
2020-06-12 10:35:06 +00:00
|
|
|
license = licenses.mpl20;
|
2021-06-10 18:09:10 +00:00
|
|
|
maintainers = with maintainers; [ mbaillie jk ];
|
2020-06-12 10:35:06 +00:00
|
|
|
};
|
|
|
|
}
|