Merge pull request #248420 from figsoda/typst-lsp
typst-lsp: 0.7.2 -> 0.8.0
This commit is contained in:
commit
4b162488d6
File diff suppressed because it is too large
Load Diff
@ -1,34 +1,49 @@
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, openssl
|
||||
, stdenv
|
||||
, darwin
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "typst-lsp";
|
||||
version = "0.7.2";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nvarner";
|
||||
repo = pname;
|
||||
repo = "typst-lsp";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-z6IG0qJXzwisazR/tLq6dwsZzgzhYKh/NnKmnYySS18=";
|
||||
hash = "sha256-jYyWPA/ifCtxujPZK7am6O0d/VpRW8hxGfd83wUtT6U=";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"elsa-1.8.1" = "sha256-/85IriplPxx24TE/CsvjIsve100QUZiVqS0TWgPFRbw=";
|
||||
"svg2pdf-0.5.0" = "sha256-v/ARFI+Uw5KtLe2F3ty9u3uKkWSradRmLnD2VJ+jmSI=";
|
||||
"typst-0.5.0" = "sha256-obUe9OVQ8M7MORudQGN7zaYjUv4zjeh7XidHHmUibTA=";
|
||||
"svg2pdf-0.5.0" = "sha256-yBQpvDAnJ7C0PWIM/o0PzOg9JlDZCEiVdCTDDPSwrmE=";
|
||||
"typst-0.6.0" = "sha256-8e6BNffKgAUNwic4uEfDh77y2nIyYt9BwZr+ypv+d5A=";
|
||||
};
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.Security
|
||||
];
|
||||
|
||||
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
|
||||
# `rustPlatform.importCargoLock` has trouble parsing the `??` in the url
|
||||
./remove-svg2pdf-patch.patch
|
||||
];
|
||||
|
||||
checkFlags = [
|
||||
# requires internet access
|
||||
"--skip=workspace::package::external::repo::test::full_download"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -1,40 +0,0 @@
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -2569,7 +2569,7 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"
|
||||
[[package]]
|
||||
name = "typst"
|
||||
version = "0.5.0"
|
||||
-source = "git+https://github.com/typst/typst.git?tag=v0.5.0#3a8b9cce471934031ba57c5972d194ac1d7d2a6c"
|
||||
+source = "git+https://github.com/typst/typst.git?rev=30bb33aafced4f1bf4a00803550f0e1e42672ded#30bb33aafced4f1bf4a00803550f0e1e42672ded"
|
||||
dependencies = [
|
||||
"bitflags 2.3.3",
|
||||
"bytemuck",
|
||||
@@ -2611,7 +2611,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "typst-library"
|
||||
version = "0.5.0"
|
||||
-source = "git+https://github.com/typst/typst.git?tag=v0.5.0#3a8b9cce471934031ba57c5972d194ac1d7d2a6c"
|
||||
+source = "git+https://github.com/typst/typst.git?rev=30bb33aafced4f1bf4a00803550f0e1e42672ded#30bb33aafced4f1bf4a00803550f0e1e42672ded"
|
||||
dependencies = [
|
||||
"az",
|
||||
"chinese-number",
|
||||
@@ -2685,7 +2685,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "typst-macros"
|
||||
version = "0.5.0"
|
||||
-source = "git+https://github.com/typst/typst.git?tag=v0.5.0#3a8b9cce471934031ba57c5972d194ac1d7d2a6c"
|
||||
+source = "git+https://github.com/typst/typst.git?rev=30bb33aafced4f1bf4a00803550f0e1e42672ded#30bb33aafced4f1bf4a00803550f0e1e42672ded"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -49,6 +49,6 @@ tracing-subscriber = { version = "0.3.17", default-features = false, features =
|
||||
"registry",
|
||||
"fmt",
|
||||
] }
|
||||
-typst = { git = "https://github.com/typst/typst.git", tag = "v0.5.0" }
|
||||
-typst-library = { git = "https://github.com/typst/typst.git", tag = "v0.5.0" }
|
||||
+typst = { git = "https://github.com/typst/typst.git", rev = "30bb33aafced4f1bf4a00803550f0e1e42672ded" }
|
||||
+typst-library = { git = "https://github.com/typst/typst.git", rev = "30bb33aafced4f1bf4a00803550f0e1e42672ded" }
|
||||
walkdir = "2.3"
|
@ -0,0 +1,26 @@
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -2387,7 +2387,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "svg2pdf"
|
||||
version = "0.5.0"
|
||||
-source = "git+https://github.com/typst/svg2pdf.git??tag=v0.5.0#39daf9fc2ee84b62b0e3b174ff8c9017f655af6b"
|
||||
+source = "git+https://github.com/typst/svg2pdf.git#39daf9fc2ee84b62b0e3b174ff8c9017f655af6b"
|
||||
dependencies = [
|
||||
"image",
|
||||
"miniz_oxide",
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -61,12 +61,5 @@ typst = { git = "https://github.com/typst/typst.git", tag = "v0.6.0" }
|
||||
typst-library = { git = "https://github.com/typst/typst.git", tag = "v0.6.0" }
|
||||
walkdir = "2.3"
|
||||
|
||||
-# Typst 0.6.0 does not specify a tag or ref for svg2pdf, so provide one...
|
||||
-# ...but Cargo doesn't want to make our lives too easy, and we can't replace the
|
||||
-# dependency with another at the same URL. Use a workaroud inspired by
|
||||
-# StackOverflow: https://stackoverflow.com/a/72261235
|
||||
-[patch."https://github.com/typst/svg2pdf"]
|
||||
-svg2pdf = { git = "https://github.com/typst/svg2pdf.git?", tag = "v0.5.0" }
|
||||
-
|
||||
[dev-dependencies]
|
||||
temp-dir = "0.1.11"
|
Loading…
Reference in New Issue
Block a user