@@ -586,6 +586,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/python-xyz.scm \
%D%/packages/toys.scm \
%D%/packages/tryton.scm \
+ %D%/packages/typst.scm \
%D%/packages/qt.scm \
%D%/packages/quantum.scm \
%D%/packages/racket.scm \
new file mode 100644
@@ -0,0 +1,637 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2025 Andrew Wong <wongandj@icloud.com>
+;;; Copyright © 2025 Alexis Simon <alexis.simon@runbox.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages typst)
+ #:use-module (guix build-system cargo)
+ #:use-module (guix download)
+ #:use-module (guix gexp)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages)
+ #:use-module (guix utils)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages crates-io)
+ #:use-module (gnu packages crates-compression)
+ #:use-module (gnu packages crates-graphics)
+ #:use-module (gnu packages crates-database)
+ #:use-module (gnu packages crates-check)
+ #:use-module (gnu packages crates-web)
+ #:use-module (gnu packages crates-apple)
+ #:use-module (gnu packages crates-windows)
+ #:use-module (gnu packages crates-tls)
+ #:use-module (gnu packages tls)
+ #:use-module (gnu packages pkg-config))
+
+(define typst-version "0.13.0")
+
+(define-public rust-typst
+ (package
+ (name "rust-typst")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0qw0fzwmvxr6dvwi90hs26kw4jqiz3a0k066pmiv6k4qr7192xqz"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs (("rust-comemo" ,rust-comemo-0.4)
+ ("rust-ecow" ,rust-ecow-0.2)
+ ("rust-typst-eval" ,rust-typst-eval)
+ ("rust-typst-html" ,rust-typst-html)
+ ("rust-typst-layout" ,rust-typst-layout)
+ ("rust-typst-library" ,rust-typst-library)
+ ("rust-typst-macros" ,rust-typst-macros)
+ ("rust-typst-realize" ,rust-typst-realize)
+ ("rust-typst-syntax" ,rust-typst-syntax)
+ ("rust-typst-timing" ,rust-typst-timing)
+ ("rust-typst-utils" ,rust-typst-utils))))
+ (home-page "https://typst.app")
+ (synopsis
+ "new markup-based typesetting system that is powerful and easy to learn.")
+ (description
+ "This package provides a new markup-based typesetting system that is powerful and
+easy to learn.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-assets
+ (package
+ (name "rust-typst-assets")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-assets" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1dp04q2608fkvkv57vh38h8bisx05zk625kbdkm32kgppdmwal8h"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t))
+ (home-page "https://typst.app")
+ (synopsis "Assets for the Typst compiler")
+ (description "This package provides Assets for the Typst compiler.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-cli
+ (package
+ (name "rust-typst-cli")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-cli" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "09zfrcc5awycl4906r5qhzfmf9qc2jxb30z0iq7dizqkd6wl900i"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs (("rust-chrono" ,rust-chrono-0.4)
+ ("rust-chrono" ,rust-chrono-0.4)
+ ("rust-clap" ,rust-clap-4)
+ ("rust-clap" ,rust-clap-4)
+ ("rust-clap-complete" ,rust-clap-complete-4)
+ ("rust-clap-mangen" ,rust-clap-mangen-0.2)
+ ("rust-codespan-reporting" ,rust-codespan-reporting-0.11)
+ ("rust-color-print" ,rust-color-print-0.3)
+ ("rust-color-print" ,rust-color-print-0.3)
+ ("rust-comemo" ,rust-comemo-0.4)
+ ("rust-dirs" ,rust-dirs-6)
+ ("rust-ecow" ,rust-ecow-0.2)
+ ("rust-fs-extra" ,rust-fs-extra-1)
+ ("rust-notify" ,rust-notify-8)
+ ("rust-open" ,rust-open-5)
+ ("rust-parking-lot" ,rust-parking-lot-0.12)
+ ("rust-pathdiff" ,rust-pathdiff-0.2)
+ ("rust-rayon" ,rust-rayon-1)
+ ("rust-same-file" ,rust-same-file-1)
+ ("rust-self-replace" ,rust-self-replace-1)
+ ("rust-semver" ,rust-semver-1)
+ ("rust-semver" ,rust-semver-1)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-json" ,rust-serde-json-1)
+ ("rust-serde-yaml" ,rust-serde-yaml-0.9)
+ ("rust-shell-escape" ,rust-shell-escape-0.1)
+ ("rust-sigpipe" ,rust-sigpipe-0.1)
+ ("rust-tar" ,rust-tar-0.4)
+ ("rust-tempfile" ,rust-tempfile-3)
+ ("rust-tiny-http" ,rust-tiny-http-0.12)
+ ("rust-toml" ,rust-toml-0.8)
+ ("rust-typst-" ,rust-typst)
+ ("rust-typst-eval" ,rust-typst-eval)
+ ("rust-typst-html" ,rust-typst-html)
+ ("rust-typst-kit" ,rust-typst-kit)
+ ("rust-typst-macros" ,rust-typst-macros)
+ ("rust-typst-pdf" ,rust-typst-pdf)
+ ("rust-typst-render" ,rust-typst-render)
+ ("rust-typst-svg" ,rust-typst-svg)
+ ("rust-typst-timing" ,rust-typst-timing)
+ ("rust-ureq" ,rust-ureq-2)
+ ("rust-xz2" ,rust-xz2-0.1)
+ ("rust-zip" ,rust-zip-2))))
+ (inputs (list openssl
+ pkg-config))
+ (home-page "https://typst.app")
+ (synopsis "The command line interface for Typst")
+ (description "This package provides The command line interface for Typst.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-eval
+ (package
+ (name "rust-typst-eval")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-eval" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0sy9gqdl1730iw3yc9p4dvmmlch0is37hvv3x81whvs643zr0xys"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-comemo" ,rust-comemo-0.4)
+ ("rust-ecow" ,rust-ecow-0.2)
+ ("rust-if-chain" ,rust-if-chain-1)
+ ("rust-indexmap" ,rust-indexmap-2)
+ ("rust-stacker" ,rust-stacker-0.1)
+ ("rust-toml" ,rust-toml-0.8)
+ ("rust-typst-library" ,rust-typst-library)
+ ("rust-typst-macros" ,rust-typst-macros)
+ ("rust-typst-syntax" ,rust-typst-syntax)
+ ("rust-typst-timing" ,rust-typst-timing)
+ ("rust-typst-utils" ,rust-typst-utils)
+ ("rust-unicode-segmentation" ,rust-unicode-segmentation-1))))
+ (home-page "https://typst.app")
+ (synopsis "Typst's code interpreter")
+ (description "This package provides Typst's code interpreter.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-html
+ (package
+ (name "rust-typst-html")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-html" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "16glm4wnrgd1cd410y4ljg4ig41kkvpwpv87wsm5n477daaxy3rv"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-comemo" ,rust-comemo-0.4)
+ ("rust-ecow" ,rust-ecow-0.2)
+ ("rust-typst-library" ,rust-typst-library)
+ ("rust-typst-macros" ,rust-typst-macros)
+ ("rust-typst-svg" ,rust-typst-svg)
+ ("rust-typst-syntax" ,rust-typst-syntax)
+ ("rust-typst-timing" ,rust-typst-timing)
+ ("rust-typst-utils" ,rust-typst-utils))))
+ (home-page "https://typst.app")
+ (synopsis "Typst's HTML exporter")
+ (description "This package provides Typst's HTML exporter.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-kit
+ (package
+ (name "rust-typst-kit")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-kit" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "05jyw7m1rv90g6b6l3zxpf1m2r78kadlnvwb3fmr0n5vyp3lg5xm"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-dirs" ,rust-dirs-6)
+ ("rust-ecow" ,rust-ecow-0.2)
+ ("rust-env-proxy" ,rust-env-proxy-0.4)
+ ("rust-flate2" ,rust-flate2-1)
+ ("rust-fontdb" ,rust-fontdb-0.21)
+ ("rust-native-tls" ,rust-native-tls-0.2)
+ ("rust-once-cell" ,rust-once-cell-1)
+ ("rust-openssl" ,rust-openssl-0.10)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-json" ,rust-serde-json-1)
+ ("rust-tar" ,rust-tar-0.4)
+ ("rust-typst-assets" ,rust-typst-assets)
+ ("rust-typst-library" ,rust-typst-library)
+ ("rust-typst-syntax" ,rust-typst-syntax)
+ ("rust-typst-timing" ,rust-typst-timing)
+ ("rust-typst-utils" ,rust-typst-utils)
+ ("rust-ureq" ,rust-ureq-2))))
+ (home-page "https://typst.app")
+ (synopsis "Common utilities for Typst tooling")
+ (description "This package provides Common utilities for Typst tooling.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-layout
+ (package
+ (name "rust-typst-layout")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-layout" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1z3pww0p217r0wzicr6bvw3lldrhidh1ak240l4iqijj2imz0pgx"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-az" ,rust-az-1)
+ ("rust-bumpalo" ,rust-bumpalo-3)
+ ("rust-comemo" ,rust-comemo-0.4)
+ ("rust-ecow" ,rust-ecow-0.2)
+ ("rust-hypher" ,rust-hypher-0.1)
+ ("rust-icu-properties" ,rust-icu-properties-1)
+ ("rust-icu-provider" ,rust-icu-provider-1)
+ ("rust-icu-provider-adapters" ,rust-icu-provider-adapters-1)
+ ("rust-icu-provider-blob" ,rust-icu-provider-blob-1)
+ ("rust-icu-segmenter" ,rust-icu-segmenter-1)
+ ("rust-kurbo" ,rust-kurbo-0.11)
+ ("rust-rustybuzz" ,rust-rustybuzz-0.18)
+ ("rust-smallvec" ,rust-smallvec-1)
+ ("rust-ttf-parser" ,rust-ttf-parser-0.24)
+ ("rust-typst-assets" ,rust-typst-assets)
+ ("rust-typst-library" ,rust-typst-library)
+ ("rust-typst-macros" ,rust-typst-macros)
+ ("rust-typst-syntax" ,rust-typst-syntax)
+ ("rust-typst-timing" ,rust-typst-timing)
+ ("rust-typst-utils" ,rust-typst-utils)
+ ("rust-unicode-bidi" ,rust-unicode-bidi-0.3)
+ ("rust-unicode-math-class" ,rust-unicode-math-class-0.1)
+ ("rust-unicode-script" ,rust-unicode-script-0.5)
+ ("rust-unicode-segmentation" ,rust-unicode-segmentation-1))))
+ (home-page "https://typst.app")
+ (synopsis "Typst's layout engine")
+ (description "This package provides Typst's layout engine.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-library
+ (package
+ (name "rust-typst-library")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-library" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1f7hi5hs8r6kri2a1n83d526rv2pw4cs4paklv5y0brqg3df2v0n"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-az" ,rust-az-1)
+ ("rust-bitflags" ,rust-bitflags-2)
+ ("rust-bumpalo" ,rust-bumpalo-3)
+ ("rust-chinese-number" ,rust-chinese-number-0.7)
+ ("rust-ciborium" ,rust-ciborium-0.2)
+ ("rust-codex" ,rust-codex-0.1)
+ ("rust-comemo" ,rust-comemo-0.4)
+ ("rust-csv" ,rust-csv-1)
+ ("rust-ecow" ,rust-ecow-0.2)
+ ("rust-flate2" ,rust-flate2-1)
+ ("rust-fontdb" ,rust-fontdb-0.21)
+ ("rust-hayagriva" ,rust-hayagriva-0.8)
+ ("rust-icu-properties" ,rust-icu-properties-1)
+ ("rust-icu-provider" ,rust-icu-provider-1)
+ ("rust-icu-provider-blob" ,rust-icu-provider-blob-1)
+ ("rust-image" ,rust-image-0.25)
+ ("rust-indexmap" ,rust-indexmap-2)
+ ("rust-kamadak-exif" ,rust-kamadak-exif-0.6)
+ ("rust-kurbo" ,rust-kurbo-0.11)
+ ("rust-lipsum" ,rust-lipsum-0.9)
+ ("rust-memchr" ,rust-memchr-2)
+ ("rust-palette" ,rust-palette-0.7)
+ ("rust-phf" ,rust-phf-0.11)
+ ("rust-png" ,rust-png-0.17)
+ ("rust-qcms" ,rust-qcms-0.3)
+ ("rust-rayon" ,rust-rayon-1)
+ ("rust-regex" ,rust-regex-1)
+ ("rust-regex-syntax" ,rust-regex-syntax-0.8)
+ ("rust-roxmltree" ,rust-roxmltree-0.20)
+ ("rust-rust-decimal" ,rust-rust-decimal-1)
+ ("rust-rustybuzz" ,rust-rustybuzz-0.18)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-json" ,rust-serde-json-1)
+ ("rust-serde-yaml" ,rust-serde-yaml-0.9)
+ ("rust-siphasher" ,rust-siphasher-1)
+ ("rust-smallvec" ,rust-smallvec-1)
+ ("rust-syntect" ,rust-syntect-5)
+ ("rust-time" ,rust-time-0.3)
+ ("rust-toml" ,rust-toml-0.8)
+ ("rust-ttf-parser" ,rust-ttf-parser-0.24)
+ ("rust-two-face" ,rust-two-face-0.4)
+ ("rust-typed-arena" ,rust-typed-arena-2)
+ ("rust-typst-assets" ,rust-typst-assets)
+ ("rust-typst-macros" ,rust-typst-macros)
+ ("rust-typst-syntax" ,rust-typst-syntax)
+ ("rust-typst-timing" ,rust-typst-timing)
+ ("rust-typst-utils" ,rust-typst-utils)
+ ("rust-unicode-math-class" ,rust-unicode-math-class-0.1)
+ ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
+ ("rust-unscanny" ,rust-unscanny-0.1)
+ ("rust-usvg" ,rust-usvg-0.43)
+ ("rust-wasmi" ,rust-wasmi-0.40)
+ ("rust-xmlwriter" ,rust-xmlwriter-0.1))))
+ (home-page "https://typst.app")
+ (synopsis "Typst's standard library")
+ (description "This package provides Typst's standard library.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-macros
+ (package
+ (name "rust-typst-macros")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-macros" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0rcdxljjlgmgq3y6ylazrd3c1a3anycyiddq063ydi8wbrjv4j67"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-heck" ,rust-heck-0.5)
+ ("rust-proc-macro2" ,rust-proc-macro2-1)
+ ("rust-quote" ,rust-quote-1)
+ ("rust-syn" ,rust-syn-2))))
+ (home-page "https://typst.app")
+ (synopsis "Proc-macros for Typst")
+ (description "This package provides Proc-macros for Typst.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-pdf
+ (package
+ (name "rust-typst-pdf")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-pdf" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1zwa31ydasky72r3gh8264nj5xkgvnqqg9ky6xjlajc6i68xlsbi"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-arrayvec" ,rust-arrayvec-0.7)
+ ("rust-base64" ,rust-base64-0.22)
+ ("rust-bytemuck" ,rust-bytemuck-1)
+ ("rust-comemo" ,rust-comemo-0.4)
+ ("rust-ecow" ,rust-ecow-0.2)
+ ("rust-image" ,rust-image-0.25)
+ ("rust-indexmap" ,rust-indexmap-2)
+ ("rust-miniz-oxide" ,rust-miniz-oxide-0.8)
+ ("rust-pdf-writer" ,rust-pdf-writer-0.12)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-subsetter" ,rust-subsetter-0.2)
+ ("rust-svg2pdf" ,rust-svg2pdf-0.12)
+ ("rust-ttf-parser" ,rust-ttf-parser-0.24)
+ ("rust-typst-assets" ,rust-typst-assets)
+ ("rust-typst-library" ,rust-typst-library)
+ ("rust-typst-macros" ,rust-typst-macros)
+ ("rust-typst-syntax" ,rust-typst-syntax)
+ ("rust-typst-timing" ,rust-typst-timing)
+ ("rust-typst-utils" ,rust-typst-utils)
+ ("rust-xmp-writer" ,rust-xmp-writer-0.3))))
+ (home-page "https://typst.app")
+ (synopsis "PDF exporter for Typst")
+ (description "This package provides PDF exporter for Typst.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-realize
+ (package
+ (name "rust-typst-realize")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-realize" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1bri9dnqhgh9bgbmrqmmpf2q8y75avrlafc1za5z6bi1h0bzp20l"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-arrayvec" ,rust-arrayvec-0.7)
+ ("rust-bumpalo" ,rust-bumpalo-3)
+ ("rust-comemo" ,rust-comemo-0.4)
+ ("rust-ecow" ,rust-ecow-0.2)
+ ("rust-regex" ,rust-regex-1)
+ ("rust-typst-library" ,rust-typst-library)
+ ("rust-typst-macros" ,rust-typst-macros)
+ ("rust-typst-syntax" ,rust-typst-syntax)
+ ("rust-typst-timing" ,rust-typst-timing)
+ ("rust-typst-utils" ,rust-typst-utils))))
+ (home-page "https://typst.app")
+ (synopsis "Typst's realization subsystem")
+ (description "This package provides Typst's realization subsystem.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-render
+ (package
+ (name "rust-typst-render")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-render" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1za9lbrmyp21sx80ja659ns5bix50dfc8f0j7zk6rc8lyr2anij9"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-bytemuck" ,rust-bytemuck-1)
+ ("rust-comemo" ,rust-comemo-0.4)
+ ("rust-image" ,rust-image-0.25)
+ ("rust-pixglyph" ,rust-pixglyph-0.5)
+ ("rust-resvg" ,rust-resvg-0.43)
+ ("rust-tiny-skia" ,rust-tiny-skia-0.11)
+ ("rust-ttf-parser" ,rust-ttf-parser-0.24)
+ ("rust-typst-library" ,rust-typst-library)
+ ("rust-typst-macros" ,rust-typst-macros)
+ ("rust-typst-timing" ,rust-typst-timing))))
+ (home-page "https://typst.app")
+ (synopsis "Raster image exporter for Typst")
+ (description "This package provides Raster image exporter for Typst.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-svg
+ (package
+ (name "rust-typst-svg")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-svg" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1mlrgf83ydxbnsz185y1z1j80hkx2dy0jy2wyjv15ipf0xhqf1dq"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-base64" ,rust-base64-0.22)
+ ("rust-comemo" ,rust-comemo-0.4)
+ ("rust-ecow" ,rust-ecow-0.2)
+ ("rust-flate2" ,rust-flate2-1)
+ ("rust-image" ,rust-image-0.25)
+ ("rust-ttf-parser" ,rust-ttf-parser-0.24)
+ ("rust-typst-library" ,rust-typst-library)
+ ("rust-typst-macros" ,rust-typst-macros)
+ ("rust-typst-timing" ,rust-typst-timing)
+ ("rust-typst-utils" ,rust-typst-utils)
+ ("rust-xmlparser" ,rust-xmlparser-0.13)
+ ("rust-xmlwriter" ,rust-xmlwriter-0.1))))
+ (home-page "https://typst.app")
+ (synopsis "SVG exporter for Typst")
+ (description "This package provides SVG exporter for Typst.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-syntax
+ (package
+ (name "rust-typst-syntax")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-syntax" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "049735g4ig5y05mx7p1d7wz075lqx6aq1wngbb9wm4n3j7hp1s5b"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-ecow" ,rust-ecow-0.2)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-toml" ,rust-toml-0.8)
+ ("rust-typst-timing" ,rust-typst-timing)
+ ("rust-typst-utils" ,rust-typst-utils)
+ ("rust-unicode-ident" ,rust-unicode-ident-1)
+ ("rust-unicode-math-class" ,rust-unicode-math-class-0.1)
+ ("rust-unicode-script" ,rust-unicode-script-0.5)
+ ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
+ ("rust-unscanny" ,rust-unscanny-0.1))))
+ (home-page "https://typst.app")
+ (synopsis "Parser and syntax tree for Typst")
+ (description "This package provides Parser and syntax tree for Typst.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-timing
+ (package
+ (name "rust-typst-timing")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-timing" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1wp4r8iq4nis4h0djp7i41h2q3qbd221jslhd93myz9xyy52hg8m"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-parking-lot" ,rust-parking-lot-0.12)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-json" ,rust-serde-json-1)
+ ("rust-web-sys" ,rust-web-sys-0.3))))
+ (home-page "https://typst.app")
+ (synopsis "Performance timing for Typst")
+ (description "This package provides Performance timing for Typst.")
+ (license license:asl2.0)))
+
+(define-public rust-typst-utils
+ (package
+ (name "rust-typst-utils")
+ (version typst-version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "typst-utils" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1aalyngas04mrn9sg57ycbpy919biy2brqpr4pvvjq0qzcrk70my"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-once-cell" ,rust-once-cell-1)
+ ("rust-portable-atomic" ,rust-portable-atomic-1)
+ ("rust-rayon" ,rust-rayon-1)
+ ("rust-siphasher" ,rust-siphasher-1)
+ ("rust-thin-vec" ,rust-thin-vec-0.2)
+ ("rust-unicode-math-class" ,rust-unicode-math-class-0.1))))
+ (home-page "https://typst.app")
+ (synopsis "Utilities for Typst")
+ (description "This package provides Utilities for Typst.")
+ (license license:asl2.0)))
+
+(define-public typst
+ (package/inherit rust-typst-cli
+ (name "typst")
+ (arguments
+ (substitute-keyword-arguments (package-arguments rust-typst-cli)
+ ((#:install-source? _ #t) #f)
+ ((#:modules _ '())
+ '((guix build cargo-build-system)
+ (guix build utils)
+ (ice-9 match)
+ (srfi srfi-26)))
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-before 'build 'configure-artifacts
+ (lambda _
+ (mkdir "artifacts")
+ (setenv "GEN_ARTIFACTS" "artifacts")))
+ (add-after 'install 'install-artifacts
+ (lambda _
+ (with-directory-excursion "artifacts"
+ (for-each (cut install-file
+ <> (string-append #$output "/share/man/man1"))
+ (find-files "." "\\.1$"))
+ (rename-file "typst.bash" "typst")
+ (map (match-lambda
+ ((file . loc)
+ (install-file file
+ (string-append #$output "/share" loc))))
+ '(("typst" . "/bash-completion/completions")
+ ("_typst" . "/zsh/site-functions")
+ ("typst.elv" . "/elvish/lib")
+ ("typst.fish" . "/fish/vendor_completions.d"))))))))))
+ (synopsis "LaTeX-like typesetting system with modern conveniences")
+ (description
+ "Typst is a markup-based typesetting system that is designed to be as
+powerful as LaTeX while being much easier to learn and use. Typst has:
+@itemize
+@item Built-in markup for the most common formatting tasks
+@item Flexible functions for everything else
+@item A tightly integrated scripting system
+@item Math typesetting, bibliography management, and more
+@item Fast compile times thanks to incremental compilation
+@item Friendly error messages in case something goes wrong
+@end itemize")))