From patchwork Sun Mar 2 21:30:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Wong X-Patchwork-Id: 39602 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 60B7C27BBE2; Sun, 2 Mar 2025 21:35:12 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5899E27BBEC for ; Sun, 2 Mar 2025 21:35:07 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1toqxP-00059v-B9; Sun, 02 Mar 2025 16:34:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1toqwH-0003cw-0t for guix-patches@gnu.org; Sun, 02 Mar 2025 16:33:36 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1toqwG-0006Oq-Fi for guix-patches@gnu.org; Sun, 02 Mar 2025 16:33:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=xs98GD/YdHjJKB7MJKo2GXjrHcJOMNRSVIl05fUDbmA=; b=exWdu14/NwuSNcqLYCdaDkax0cUEh3ciSbHshE+WF8oULpXLC97RPT62e7QpUPPb15/6tJXd1NldIBAz2tPv2dHxF9P6KZNSMf864IZWPfOREZiBrDKd9beHiztk1jpnmQb7AWoUggecIc/E1AaXWaUDG9Now6m9zSlrgvystDfSStmfXuxXcTnn6FNNBwguylKKnQ6V/sKbTyN4HxXephNZAzodow+Xz9Vyv/tvt7d4i2wsSnnw0QPmT4h3Qc2HfZSBJNat/iDtYw6Be0W6mM0YBIQTngCS34Ko/Z33sufBgCPJNlg3fFby0/o6E8qwS6lqs/qbtcldrr/yWxk5OA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1toqwG-0001jg-4y; Sun, 02 Mar 2025 16:33:32 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76513] [PATCH rust-team v3 77/78] gnu: Add new module (gnu packages typst). Resent-From: Andrew Wong Original-Sender: "Debbugs-submit" Resent-CC: divya@subvertising.org, efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Sun, 02 Mar 2025 21:33:32 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76513 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76513@debbugs.gnu.org Cc: Andrew Wong , divya@subvertising.org, efraim@flashner.co.il X-Debbugs-Original-Xcc: divya@subvertising.org, efraim@flashner.co.il Received: via spool by 76513-submit@debbugs.gnu.org id=B76513.17409512026496 (code B ref 76513); Sun, 02 Mar 2025 21:33:32 +0000 Received: (at 76513) by debbugs.gnu.org; 2 Mar 2025 21:33:22 +0000 Received: from localhost ([127.0.0.1]:37564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1toqw3-0001g2-QS for submit@debbugs.gnu.org; Sun, 02 Mar 2025 16:33:21 -0500 Received: from qs51p00im-qukt01080501.me.com ([17.57.155.22]:41051) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1toqvI-0001Pw-I5 for 76513@debbugs.gnu.org; Sun, 02 Mar 2025 16:32:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; bh=xs98GD/YdHjJKB7MJKo2GXjrHcJOMNRSVIl05fUDbmA=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:x-icloud-hme; b=kY9O+I30qWKrqXP4vwtcYgExTfzo1XQvaSyilB2NWnudPYdL9FxJvKNy34k3GLPmz ymKVnpRm66W6x8NWiCKGKQOkp/1UPO9XOPTcfZcP2fRaAoQJFvotdVBRN7VpoasFms u1D6bxMllTHvKr+29HLOV45hlguGmW+f+RLBvKFXSR9/SeojF72JmfBAIfWxacuFbh a8OhP/eItEengNasRcLrLuNd3FXTBXlE2iI8Vk9S6wqd5+uO/+BeAHq3/t8w40bJKJ MTQ5Zaficg02XpDM+nbO4R8eLFl218erm1e+Wmx83ueFeHumtnk0x6F9E434Yj3/mV IC7IEobTrsBQA== Received: from wongworks.lan (qs51p00im-dlb-asmtp-mailmevip.me.com [17.57.155.28]) by qs51p00im-qukt01080501.me.com (Postfix) with ESMTPSA id 01571198014E; Sun, 2 Mar 2025 21:32:25 +0000 (UTC) Date: Sun, 2 Mar 2025 16:30:48 -0500 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: eBgCjdTnP0P9-dx9K4VITVtpZBROsX7G X-Proofpoint-GUID: eBgCjdTnP0P9-dx9K4VITVtpZBROsX7G X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-02_06,2025-02-28_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 spamscore=0 clxscore=1015 adultscore=0 phishscore=0 mlxscore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2503020175 X-Apple-Remote-Links: v=1;h=KCk=;charset=UTF-8 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Andrew Wong X-ACL-Warn: , Andrew Wong via Guix-patches X-Patchwork-Original-From: Andrew Wong via Guix-patches via From: Andrew Wong Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/typst.scm (rust-typst, rust-typst-assets, rust-typst-cli, rust-typst-eval, rust-typst-html, rust-typst-kit, rust-typst-layout, rust-typst-library, rust-typst-macros, rust-typst-pdf, rust-typst-realize, rust-typst-render, rust-typst-svg, rust-typst-syntax, rust-typst-timing, rust-typst-utils, typst): New variables. * gnu/local.mk (GNU_SYSTEM_MODULES): Register new file. Change-Id: I69ba2f10e3f56f48711fe5c3eb4d7b0e2ba4afcf --- gnu/local.mk | 1 + gnu/packages/typst.scm | 645 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 646 insertions(+) create mode 100644 gnu/packages/typst.scm diff --git a/gnu/local.mk b/gnu/local.mk index 01926bb1b8..ef6da46b07 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -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 \ diff --git a/gnu/packages/typst.scm b/gnu/packages/typst.scm new file mode 100644 index 0000000000..7deb5ef898 --- /dev/null +++ b/gnu/packages/typst.scm @@ -0,0 +1,645 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2025 Andrew Wong +;;; Copyright © 2025 Alexis Simon +;;; +;;; 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 . + +(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")))))))))) + (native-search-paths + (list (search-path-specification + (variable "TYPST_PACKAGE_PATH") + (files '("share/typst/packages")) + (separator #f)) + (search-path-specification + (variable "TYPST_FONT_PATHS") + (files '("share/fonts" "share/texmf-dist/fonts"))))) + (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")))