13 rustPlatform.buildRustPackage rec {
15 # Please update the corresponding vscode extension when updating
19 src = fetchFromGitHub {
22 rev = "refs/tags/v${version}";
23 hash = "sha256-OubKtSHw9L4GzVzZY0AVdHY7LzKg/XQIhUfUc2OYAG0=";
27 lockFile = ./Cargo.lock;
29 "typst-syntax-0.7.0" = "sha256-yrtOmlFAKOqAmhCP7n0HQCOQpU3DWyms5foCdUb9QTg=";
30 "typstfmt_lib-0.2.7" = "sha256-LBYsTCjZ+U+lgd7Z3H1sBcWwseoHsuepPd66bWgfvhI=";
34 # In order to make typst-lsp build with rust >= 1.80, we use the patched Cargo.lock from
35 # https://github.com/nvarner/typst-lsp/pull/515
36 # TODO remove once the PR will have been merged upstream
39 ln -s ${./Cargo.lock} Cargo.lock
42 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
43 darwin.apple_sdk.frameworks.SystemConfiguration
48 # requires internet access
49 "--skip=workspace::package::external::remote_repo::test::full_download"
51 ++ lib.optionals stdenv.hostPlatform.isDarwin [
52 # both tests fail on darwin with 'Attempted to create a NULL object.'
53 "--skip=workspace::fs::local::test::read"
54 "--skip=workspace::package::external::manager::test::local_package"
57 # workspace::package::external::manager::test::local_package tries to access the data directory
59 export HOME=$(mktemp -d)
63 updateScript = nix-update-script { };
65 vscode-extension = vscode-extensions.nvarner.typst-lsp;
66 version = testers.testVersion { package = typst-lsp; };
71 description = "Brand-new language server for Typst";
72 homepage = "https://github.com/nvarner/typst-lsp";
73 mainProgram = "typst-lsp";
74 changelog = "https://github.com/nvarner/typst-lsp/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
75 license = with lib.licenses; [
79 maintainers = with lib.maintainers; [