chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / ty / typst-lsp / package.nix
blob047be6e535f01ac58f43486c94dab907bb8be9d4
2   lib,
3   rustPlatform,
4   fetchFromGitHub,
5   stdenv,
6   darwin,
7   nix-update-script,
8   vscode-extensions,
9   testers,
10   typst-lsp,
13 rustPlatform.buildRustPackage rec {
14   pname = "typst-lsp";
15   # Please update the corresponding vscode extension when updating
16   # this derivation.
17   version = "0.13.0";
19   src = fetchFromGitHub {
20     owner = "nvarner";
21     repo = "typst-lsp";
22     rev = "refs/tags/v${version}";
23     hash = "sha256-OubKtSHw9L4GzVzZY0AVdHY7LzKg/XQIhUfUc2OYAG0=";
24   };
26   cargoLock = {
27     lockFile = ./Cargo.lock;
28     outputHashes = {
29       "typst-syntax-0.7.0" = "sha256-yrtOmlFAKOqAmhCP7n0HQCOQpU3DWyms5foCdUb9QTg=";
30       "typstfmt_lib-0.2.7" = "sha256-LBYsTCjZ+U+lgd7Z3H1sBcWwseoHsuepPd66bWgfvhI=";
31     };
32   };
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
37   postPatch = ''
38     rm Cargo.lock
39     ln -s ${./Cargo.lock} Cargo.lock
40   '';
42   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
43     darwin.apple_sdk.frameworks.SystemConfiguration
44   ];
46   checkFlags =
47     [
48       # requires internet access
49       "--skip=workspace::package::external::remote_repo::test::full_download"
50     ]
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"
55     ];
57   # workspace::package::external::manager::test::local_package tries to access the data directory
58   preCheck = ''
59     export HOME=$(mktemp -d)
60   '';
62   passthru = {
63     updateScript = nix-update-script { };
64     tests = {
65       vscode-extension = vscode-extensions.nvarner.typst-lsp;
66       version = testers.testVersion { package = typst-lsp; };
67     };
68   };
70   meta = {
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; [
76       asl20
77       mit
78     ];
79     maintainers = with lib.maintainers; [
80       figsoda
81       GaetanLepage
82     ];
83   };