nixpkgs/pkgs/development/tools/misc/terraform-ls/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, stdenv }:
buildGoModule rec {
pname = "terraform-ls";
2022-12-07 02:19:13 +00:00
version = "0.30.1";
src = fetchFromGitHub {
owner = "hashicorp";
repo = pname;
rev = "v${version}";
2022-12-07 02:19:13 +00:00
sha256 = "sha256-enPnj4/p83hQkVv821MGyGipgEmVo12IZzy/3y8UprQ=";
};
2022-12-07 02:19:13 +00:00
vendorSha256 = "sha256-U3zslBDVz5nvhNgcn5L84hSUolf7XFCuh7zMZxyW/gQ=";
2021-07-02 07:19:29 +00:00
ldflags = [ "-s" "-w" "-X main.version=v${version}" "-X main.prerelease=" ];
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-08-02 13:13:42 +00:00
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/terraform-ls --help
$out/bin/terraform-ls version | grep "v${version}"
runHook postInstallCheck
'';
meta = with lib; {
description = "Terraform Language Server (official)";
homepage = "https://github.com/hashicorp/terraform-ls";
changelog = "https://github.com/hashicorp/terraform-ls/blob/v${version}/CHANGELOG.md";
license = licenses.mpl20;
maintainers = with maintainers; [ mbaillie jk ];
};
}