vscode-extensions.nvarner.typst-lsp: move to a directory

This commit is contained in:
superherointj 2024-04-11 10:00:39 -03:00
parent 4e210b2a3b
commit 024fe44e72
2 changed files with 40 additions and 31 deletions

View File

@ -14,7 +14,6 @@
, jq
, shellcheck
, moreutils
, typst-lsp
, autoPatchelfHook
, zlib
, stdenv
@ -3140,36 +3139,7 @@ let
};
};
nvarner.typst-lsp = buildVscodeMarketplaceExtension {
mktplcRef = {
name = "typst-lsp";
publisher = "nvarner";
# Please update the corresponding binary (typst-lsp) when updating
# this extension.
version = "0.12.1";
hash = "sha256-JcfFaR1wU5XwapH8vnfVy7Cb7DfUWVeoLfBV3wEtCpE=";
};
nativeBuildInputs = [ jq moreutils ];
buildInputs = [
typst-lsp
];
postInstall = ''
cd "$out/$installPrefix"
jq '.contributes.configuration.properties."typst-lsp.serverPath".default = "${lib.getExe typst-lsp}"' package.json | sponge package.json
'';
meta = {
changelog = "https://marketplace.visualstudio.com/items/nvarner.typst-lsp/changelog";
description = "A VSCode extension for providing a language server for Typst";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=nvarner.typst-lsp";
homepage = "https://github.com/nvarner/typst-lsp";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.drupol ];
};
};
nvarner.typst-lsp = callPackage ./nvarner.typst-lsp { };
ocamllabs.ocaml-platform = buildVscodeMarketplaceExtension {
meta = {

View File

@ -0,0 +1,39 @@
{
jq,
lib,
moreutils,
typst-lsp,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "typst-lsp";
publisher = "nvarner";
# Please update the corresponding binary (typst-lsp) when updating
# this extension.
version = "0.12.1";
hash = "sha256-JcfFaR1wU5XwapH8vnfVy7Cb7DfUWVeoLfBV3wEtCpE=";
};
nativeBuildInputs = [
jq
moreutils
];
buildInputs = [ typst-lsp ];
postInstall = ''
cd "$out/$installPrefix"
jq '.contributes.configuration.properties."typst-lsp.serverPath".default = "${lib.getExe typst-lsp}"' package.json | sponge package.json
'';
meta = {
changelog = "https://marketplace.visualstudio.com/items/nvarner.typst-lsp/changelog";
description = "A VSCode extension for providing a language server for Typst";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=nvarner.typst-lsp";
homepage = "https://github.com/nvarner/typst-lsp";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.drupol ];
};
}