From 084146d08d1b4ebfe975130fca397f5650c7e03f Mon Sep 17 00:00:00 2001 From: emaryn Date: Fri, 13 Jun 2025 10:54:39 +0800 Subject: [PATCH] vscode-extensions.hashicorp.terraform: 2.34.3 -> 2.34.4 --- .../hashicorp.terraform/default.nix | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/editors/vscode/extensions/hashicorp.terraform/default.nix b/pkgs/applications/editors/vscode/extensions/hashicorp.terraform/default.nix index d6a72f85ceef..1fdbc79eb4ee 100644 --- a/pkgs/applications/editors/vscode/extensions/hashicorp.terraform/default.nix +++ b/pkgs/applications/editors/vscode/extensions/hashicorp.terraform/default.nix @@ -1,21 +1,32 @@ { lib, vscode-utils, + jq, + moreutils, terraform-ls, + vscode-extension-update-script, }: + vscode-utils.buildVscodeMarketplaceExtension { mktplcRef = { name = "terraform"; publisher = "hashicorp"; - version = "2.34.3"; - hash = "sha256-kE9xH0cp741aCqhrwFDW+lQxOAsdLNzCCOTWMxd+li0="; + version = "2.34.4"; + hash = "sha256-gTU37q7kh51CxqQE7KylSwEK4ubiUU5uihbFew/Fg98="; }; - postPatch = '' - substituteInPlace dist/extension.js \ - --replace-fail 'this.customBinPath=Ga("terraform").get("languageServer.path")' 'this.customBinPath = Ga("terraform").get("languageServer.path") || '${terraform-ls}/bin/terraform-ls';' + postInstall = '' + cd "$out/$installPrefix" + ${lib.getExe jq} '.contributes.configuration[0].properties."terraform.languageServer.path".default = "${terraform-ls}/bin/terraform-ls"' package.json | ${lib.getExe' moreutils "sponge"} package.json ''; + passthru.updateScript = vscode-extension-update-script { + extraArgs = [ + "--override-filename" + "pkgs/applications/editors/vscode/extensions/hashicorp.terraform/default.nix" + ]; + }; + meta = { license = lib.licenses.mit; maintainers = [ lib.maintainers.rhoriguchi ];