about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/language-servers/typst-lsp/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/language-servers/typst-lsp/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/language-servers/typst-lsp/default.nix18
1 files changed, 12 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/tools/language-servers/typst-lsp/default.nix b/nixpkgs/pkgs/development/tools/language-servers/typst-lsp/default.nix
index 20451ca6d82a..04c048a956c2 100644
--- a/nixpkgs/pkgs/development/tools/language-servers/typst-lsp/default.nix
+++ b/nixpkgs/pkgs/development/tools/language-servers/typst-lsp/default.nix
@@ -5,31 +5,37 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "typst-lsp";
-  version = "0.5.1";
+  version = "0.7.2";
 
   src = fetchFromGitHub {
     owner = "nvarner";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-UY7HfUNssOgEuBBPpUFJZs1TM4IT0/kRcjqrXPFoShI=";
+    hash = "sha256-z6IG0qJXzwisazR/tLq6dwsZzgzhYKh/NnKmnYySS18=";
   };
 
   cargoLock = {
     lockFile = ./Cargo.lock;
     outputHashes = {
       "elsa-1.8.1" = "sha256-/85IriplPxx24TE/CsvjIsve100QUZiVqS0TWgPFRbw=";
-      "svg2pdf-0.4.1" = "sha256-WeVP+yhqizpTdRfyoj2AUxFKhGvVJIIiRV0GTXkgLtQ=";
-      "typst-0.4.0" = "sha256-S8J2D87Zvyh501d8LG69in9om/nTS6Y+IDhJvjm/H0w=";
+      "svg2pdf-0.5.0" = "sha256-v/ARFI+Uw5KtLe2F3ty9u3uKkWSradRmLnD2VJ+jmSI=";
+      "typst-0.5.0" = "sha256-obUe9OVQ8M7MORudQGN7zaYjUv4zjeh7XidHHmUibTA=";
     };
   };
 
-  cargoHash = "sha256-ISkw0lhUKJG8nWUHcR93sLUFt5dDEyK7EORcOXEmVbE=";
+  patches = [
+    # typst-library tries to access the workspace with include_bytes, which
+    # fails when it is vendored as its own separate crate
+    # this patch moves the required assets into the crate and fixes the issue
+    # see https://github.com/typst/typst/pull/1515
+    ./move-typst-assets.patch
+  ];
 
   meta = with lib; {
     description = "A brand-new language server for Typst";
     homepage = "https://github.com/nvarner/typst-lsp";
     changelog = "https://github.com/nvarner/typst-lsp/releases/tag/${src.rev}";
-    license = with licenses; [ mit ];
+    license = with licenses; [ asl20 mit ];
     maintainers = with maintainers; [ figsoda GaetanLepage ];
   };
 }