From 024fe44e72d85f603885c004e154001b90a089f7 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Thu, 11 Apr 2024 10:00:39 -0300 Subject: [PATCH] vscode-extensions.nvarner.typst-lsp: move to a directory --- .../editors/vscode/extensions/default.nix | 32 +-------------- .../extensions/nvarner.typst-lsp/default.nix | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+), 31 deletions(-) create mode 100644 pkgs/applications/editors/vscode/extensions/nvarner.typst-lsp/default.nix diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index 34de692767b0..c78f1e520ffd 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -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 = { diff --git a/pkgs/applications/editors/vscode/extensions/nvarner.typst-lsp/default.nix b/pkgs/applications/editors/vscode/extensions/nvarner.typst-lsp/default.nix new file mode 100644 index 000000000000..ec054521240d --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/nvarner.typst-lsp/default.nix @@ -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 ]; + }; +}