nixpkgs/pkgs/by-name/ti/tinymist/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

73 lines
1.7 KiB
Nix
Raw Normal View History

2024-03-25 17:34:07 +00:00
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, libgit2
, openssl
, zlib
, stdenv
, darwin
, nix-update-script
, testers
, tinymist
2024-03-25 17:34:07 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "tinymist";
2024-03-29 08:59:12 +00:00
# Please update the corresponding vscode extension when updating
# this derivation.
2024-07-15 05:14:40 +00:00
version = "0.11.15";
2024-03-25 17:34:07 +00:00
src = fetchFromGitHub {
owner = "Myriad-Dreamin";
repo = "tinymist";
rev = "refs/tags/v${version}";
2024-07-15 05:14:40 +00:00
hash = "sha256-s0TGi0HNZrl5BdI/QmDB33lsKkoO/RH1FOJheWYvS8k=";
2024-03-25 17:34:07 +00:00
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"typst-0.11.1" = "sha256-VDwyTKrtzmjMhVCp/GnZrgL6P6dLyKlLNA+LhoXBDl0=";
2024-04-06 12:20:05 +00:00
"typst-syntax-0.7.0" = "sha256-yrtOmlFAKOqAmhCP7n0HQCOQpU3DWyms5foCdUb9QTg=";
"typstfmt_lib-0.2.7" = "sha256-LBYsTCjZ+U+lgd7Z3H1sBcWwseoHsuepPd66bWgfvhI=";
2024-03-25 17:34:07 +00:00
};
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
libgit2
openssl
zlib
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk_11_0.frameworks.CoreFoundation
darwin.apple_sdk_11_0.frameworks.CoreServices
darwin.apple_sdk_11_0.frameworks.Security
darwin.apple_sdk_11_0.frameworks.SystemConfiguration
];
2024-04-06 12:20:05 +00:00
checkFlags = [
"--skip=e2e"
];
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion {
command = "${meta.mainProgram} -V";
package = tinymist;
};
};
meta = {
2024-04-06 12:20:05 +00:00
changelog = "https://github.com/Myriad-Dreamin/tinymist/blob/${src.rev}/CHANGELOG.md";
2024-03-25 17:34:07 +00:00
description = "Tinymist is an integrated language service for Typst";
homepage = "https://github.com/Myriad-Dreamin/tinymist";
license = lib.licenses.asl20;
2024-03-25 17:34:07 +00:00
mainProgram = "tinymist";
maintainers = with lib.maintainers; [ lampros ];
2024-03-25 17:34:07 +00:00
};
}