summary refs log tree commit diff
path: root/pkgs/development/tools/misc/terraform-ls/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
committerAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
commit62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch)
treec2630f69080637987b68acb1ee8676d2681fe304 /pkgs/development/tools/misc/terraform-ls/default.nix
parentd9c82ed3044c72cecf01c6ea042489d30914577c (diff)
parente24069138dfec3ef94f211f1da005bb5395adc11 (diff)
downloadnixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/development/tools/misc/terraform-ls/default.nix')
-rw-r--r--pkgs/development/tools/misc/terraform-ls/default.nix34
1 files changed, 27 insertions, 7 deletions
diff --git a/pkgs/development/tools/misc/terraform-ls/default.nix b/pkgs/development/tools/misc/terraform-ls/default.nix
index 714416f9685..86afbcc9421 100644
--- a/pkgs/development/tools/misc/terraform-ls/default.nix
+++ b/pkgs/development/tools/misc/terraform-ls/default.nix
@@ -1,24 +1,44 @@
-{ lib, buildGoPackage, fetchFromGitHub }:
+{ lib, buildGoModule, fetchFromGitHub, stdenv }:
 
-buildGoPackage rec {
+buildGoModule rec {
   pname = "terraform-ls";
-  version = "0.6.1";
+  version = "0.19.1";
 
   src = fetchFromGitHub {
     owner = "hashicorp";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0yhpxb9dkwi6rlabr0sd5rk15q0bin6yhww171jrzlnfl036l0sl";
+    sha256 = "sha256-ag8Dq3lhLoKE4rgrnWLHtKRHEnw/ytyXI+pRt5CgZJI=";
   };
+  vendorSha256 = "sha256-/lpjlThr6HPkuJ6om9ifBsdsh0x4kVXM6PAonk7GJCY=";
 
-  goPackagePath = "github.com/hashicorp/terraform-ls";
+  ldflags = [ "-s" "-w" "-X main.version=v${version}" "-X main.prerelease=" ];
 
-  buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
+  preCheck = ''
+    # Remove tests that requires networking
+    rm internal/terraform/exec/exec_test.go
+  '' + lib.optionalString stdenv.isAarch64 ''
+    # Not all test failures have tracking issues as HashiCorp do not have
+    # aarch64 testing infra easily available, see issue 549 below.
+
+    # Remove file that contains `TestLangServer_workspaceExecuteCommand_modules_multiple`
+    # which fails on aarch64: https://github.com/hashicorp/terraform-ls/issues/549
+    rm internal/langserver/handlers/execute_command_modules_test.go
+
+    # `TestModuleManager_ModuleCandidatesByPath` variants fail
+    rm internal/terraform/module/module_manager_test.go
+
+    # internal/terraform/module/module_ops_queue_test.go:17:15: undefined: testLogger
+    # internal/terraform/module/watcher_test.go:39:11: undefined: testLogger
+    # internal/terraform/module/watcher_test.go:79:14: undefined: testLogger
+    rm internal/terraform/module/{watcher_test,module_ops_queue_test}.go
+  '';
 
   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 ];
+    maintainers = with maintainers; [ mbaillie jk ];
   };
 }