diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index 1170b2db2768..4cc60195c9e3 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -1612,6 +1612,8 @@ let }; }; + elijah-potter.harper = callPackage ./elijah-potter.harper { }; + elixir-lsp.vscode-elixir-ls = buildVscodeMarketplaceExtension { mktplcRef = { name = "elixir-ls"; diff --git a/pkgs/applications/editors/vscode/extensions/elijah-potter.harper/default.nix b/pkgs/applications/editors/vscode/extensions/elijah-potter.harper/default.nix new file mode 100644 index 000000000000..93e87a47131c --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/elijah-potter.harper/default.nix @@ -0,0 +1,38 @@ +{ + lib, + vscode-utils, + vscode-extension-update-script, + jq, + harper, + moreutils, + ... +}: + +vscode-utils.buildVscodeMarketplaceExtension { + mktplcRef = { + name = "harper"; + publisher = "elijah-potter"; + version = harper.version; + hash = "sha256-m9PN1BZf6rLrNnX8meX2TjGx8zGLl0GgnHEgQirh9Oc="; + }; + + nativeBuildInputs = [ + jq + moreutils + ]; + + postInstall = '' + cd "$out/$installPrefix" + jq '.contributes.configuration.properties."harper.path".default = "${harper}/bin/harper-ls"' package.json | sponge package.json + ''; + passthru.updateScript = vscode-extension-update-script { }; + + meta = { + changelog = "https://github.com/Automattic/harper/releases/tag/v${harper.version}"; + description = "The grammar checker for developers as a Visual Studio Code extension"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=elijah-potter.harper"; + homepage = "https://github.com/automattic/harper"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ MasterEvarior ]; + }; +}