1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00
nixpkgs/pkgs/misc/vscode-extensions/terraform/default.nix

26 lines
769 B
Nix

{ lib, fetchurl, vscode-utils, terraform-ls }:
vscode-utils.buildVscodeMarketplaceExtension rec {
mktplcRef = {
name = "terraform";
publisher = "hashicorp";
version = "2.10.1";
};
vsix = fetchurl {
name = "${mktplcRef.publisher}-${mktplcRef.name}.zip";
url = "https://github.com/hashicorp/vscode-terraform/releases/download/v${mktplcRef.version}/${mktplcRef.name}-${mktplcRef.version}.vsix";
sha256 = "1galibrk4fx4qwa6q17mmwlikx78nmhgv1h98haiyak666cinzcq";
};
patches = [ ./fix-terraform-ls.patch ];
postPatch = ''
substituteInPlace out/extension.js --replace TERRAFORM-LS-PATH ${terraform-ls}/bin/terraform-ls
'';
meta = with lib; {
license = licenses.mit;
maintainers = with maintainers; [ rhoriguchi ];
};
}