mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-09 13:43:50 +00:00
53 lines
1.4 KiB
Nix
53 lines
1.4 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, stdenv
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "typst-lsp";
|
|
# Please update the corresponding vscode extension when updating
|
|
# this derivation.
|
|
version = "0.10.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nvarner";
|
|
repo = "typst-lsp";
|
|
rev = "v${version}";
|
|
hash = "sha256-ZQLxZzWVGwFtU68ASlzBDMz8RHrA0h925u6UDk7vPe4=";
|
|
};
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
outputHashes = {
|
|
"typst-0.8.0" = "sha256-q2b/PoNwpzarJbIPzokYgZRD2/Oe/XB40C4VXdwL/NA=";
|
|
"typst-syntax-0.7.0" = "sha256-yrtOmlFAKOqAmhCP7n0HQCOQpU3DWyms5foCdUb9QTg=";
|
|
"typstfmt_lib-0.2.5" = "sha256-+iQOS+WPCWevUFurLfuC5mhuRdJ/1ZsekFoFDzZviag=";
|
|
};
|
|
};
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
darwin.apple_sdk.frameworks.Security
|
|
];
|
|
|
|
checkFlags = [
|
|
# requires internet access
|
|
"--skip=workspace::package::external::remote_repo::test::full_download"
|
|
];
|
|
|
|
# workspace::package::external::manager::test::local_package tries to access the data directory
|
|
preCheck = ''
|
|
export HOME=$(mktemp -d)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A brand-new language server for Typst";
|
|
homepage = "https://github.com/nvarner/typst-lsp";
|
|
mainProgram = "typst-lsp";
|
|
changelog = "https://github.com/nvarner/typst-lsp/releases/tag/${src.rev}";
|
|
license = with licenses; [ asl20 mit ];
|
|
maintainers = with maintainers; [ figsoda GaetanLepage ];
|
|
};
|
|
}
|