diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-04-12 06:01:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 06:01:06 +0000 |
commit | 4d4fee11d0e324f25df68d2fc195c581381149be (patch) | |
tree | ac223968a17370426ab3e62db66d7e7085840309 /pkgs/tools/typesetting | |
parent | 47157337bf48dcbd7bca4a4cddcc98bc04479ee3 (diff) | |
parent | c70dabd94612630c6857b2200e8e1176d458b672 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r-- | pkgs/tools/typesetting/typst/Cargo.lock | 110 | ||||
-rw-r--r-- | pkgs/tools/typesetting/typst/default.nix | 20 |
2 files changed, 120 insertions, 10 deletions
diff --git a/pkgs/tools/typesetting/typst/Cargo.lock b/pkgs/tools/typesetting/typst/Cargo.lock index 6cc43ac7d1b77..ef58bf1cedc57 100644 --- a/pkgs/tools/typesetting/typst/Cargo.lock +++ b/pkgs/tools/typesetting/typst/Cargo.lock @@ -171,6 +171,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] +name = "chinese-number" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "365a2e504d6cb41e85fba5d01a6baf7f13cad4424102859193c4674e7fdff933" +dependencies = [ + "chinese-numerals", + "chinese-variant", + "enum-ordinalize", + "num-bigint", + "num-traits", +] + +[[package]] +name = "chinese-numerals" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a5a40575256b55eebe3e39fa41e53bdaea5d67ac5a7092fa8756020c798d1e" + +[[package]] +name = "chinese-variant" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeea139b89efab957972956e5d3e4efb66a6c261f726abf6911040cc8ef700f7" + +[[package]] name = "chrono" version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -207,6 +232,15 @@ dependencies = [ ] [[package]] +name = "clap_complete" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c22dcfb410883764b29953103d9ef7bb8fe21b3fa1158bc99986c2067294bd" +dependencies = [ + "clap", +] + +[[package]] name = "clap_derive" version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -225,6 +259,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" [[package]] +name = "clap_mangen" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4237e29de9c6949982ba87d51709204504fb8ed2fd38232fcb1e5bf7d4ba48c8" +dependencies = [ + "clap", + "roff", +] + +[[package]] name = "codespan-reporting" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -431,6 +475,20 @@ dependencies = [ ] [[package]] +name = "enum-ordinalize" +version = "3.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62bb1df8b45ecb7ffa78dca1c17a438fb193eb083db0b1b494d2a61bcb5096a" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "rustc_version", + "syn 1.0.109", +] + +[[package]] name = "errno" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -673,9 +731,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown", @@ -911,6 +969,17 @@ dependencies = [ ] [[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] name = "num-integer" version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1166,6 +1235,12 @@ dependencies = [ ] [[package]] +name = "roff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b833d8d034ea094b1ea68aa6d5c740e0d04bad9d16568d08ba6f76823a114316" + +[[package]] name = "roxmltree" version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1175,6 +1250,15 @@ dependencies = [ ] [[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] name = "rustix" version = "0.37.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1241,6 +1325,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" [[package]] +name = "semver" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" + +[[package]] name = "serde" version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1507,7 +1597,7 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" [[package]] name = "typst" -version = "0.1.0" +version = "0.2.0" dependencies = [ "bitflags", "bytemuck", @@ -1516,6 +1606,7 @@ dependencies = [ "flate2", "if_chain", "image", + "indexmap", "log", "miniz_oxide 0.5.4", "once_cell", @@ -1543,10 +1634,12 @@ dependencies = [ [[package]] name = "typst-cli" -version = "0.1.0" +version = "0.2.0" dependencies = [ "chrono", "clap", + "clap_complete", + "clap_mangen", "codespan-reporting", "comemo", "dirs", @@ -1564,7 +1657,7 @@ dependencies = [ [[package]] name = "typst-docs" -version = "0.1.0" +version = "0.2.0" dependencies = [ "comemo", "heck", @@ -1582,8 +1675,9 @@ dependencies = [ [[package]] name = "typst-library" -version = "0.1.0" +version = "0.2.0" dependencies = [ + "chinese-number", "comemo", "csv", "ecow", @@ -1611,7 +1705,7 @@ dependencies = [ [[package]] name = "typst-macros" -version = "0.1.0" +version = "0.2.0" dependencies = [ "heck", "proc-macro2", @@ -1622,7 +1716,7 @@ dependencies = [ [[package]] name = "typst-tests" -version = "0.1.0" +version = "0.2.0" dependencies = [ "comemo", "elsa", diff --git a/pkgs/tools/typesetting/typst/default.nix b/pkgs/tools/typesetting/typst/default.nix index 7d6f3215fac56..aaae06d0ba02b 100644 --- a/pkgs/tools/typesetting/typst/default.nix +++ b/pkgs/tools/typesetting/typst/default.nix @@ -1,19 +1,20 @@ { lib , rustPlatform , fetchFromGitHub +, installShellFiles , stdenv , darwin }: rustPlatform.buildRustPackage rec { pname = "typst"; - version = "0.1.0"; + version = "0.2.0"; src = fetchFromGitHub { owner = "typst"; repo = "typst"; rev = "v${version}"; - hash = "sha256-fPcQlgmpViDsvd9OmnP1wZoMTOtyL5pfH6plktNG0JQ="; + hash = "sha256-3vNJmLmbskAzXVXjiSVDLhRcX1j3ksOgPd53W31YZ0c="; }; cargoLock = { @@ -23,10 +24,25 @@ rustPlatform.buildRustPackage rec { }; }; + nativeBuildInputs = [ + installShellFiles + ]; + buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; + env = { + GEN_ARTIFACTS = "artifacts"; + }; + + postInstall = '' + installManPage cli/artifacts/*.1 + installShellCompletion \ + cli/artifacts/typst.{bash,fish} \ + --zsh cli/artifacts/_typst + ''; + meta = with lib; { description = "A new markup-based typesetting system that is powerful and easy to learn"; homepage = "https://typst.app"; |