Message ID | cover.1740340804.git.wongandj@icloud.com |
---|---|
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B25AF27BBE9; Sun, 23 Feb 2025 20:06:36 +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=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 CCD7627BBE2 for <patchwork@mira.cbaines.net>; Sun, 23 Feb 2025 20:06:34 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1tmIEu-0008O7-Hm; Sun, 23 Feb 2025 15:06:12 -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 <Debian-debbugs@debbugs.gnu.org>) id 1tmIEl-0008NU-K7 for guix-patches@gnu.org; Sun, 23 Feb 2025 15:06:04 -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 <Debian-debbugs@debbugs.gnu.org>) id 1tmIEl-00053F-BF for guix-patches@gnu.org; Sun, 23 Feb 2025 15:06:03 -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:Date:From:To:Subject; bh=jE7tHaf8IYWX1Klc2C8rYnuBhFvxN39liz2zRl2lXiI=; b=WI+dqkOqgFKsh6DHvzrFNcpK+/aQ+TI8ZW6IBjZWbCddX5KYcwEvJ1Thlz8o7VNjwCGLNd8I8UwTMSvl0NmeWgBuFmp8g+vv2XP56LIdc7L93S5mzW2VvYLhpktwP+C9Jn8Yc2r9B29GjeGb76BPxWK+cYJGe0aMNslbWOMALpQeivf82Ebfv8bTHQjvdjeA7d+dqYI71V8dogsysPnQbvVoa1/YV+b0AFPvXskJx2QVVKjD2+wnor09PLnhXCHbBhV9MFRUtapP7PA3tLFvkN8DRmwuHKj/KDupEq0lvauDC2Gmk05k8CyJVM6CBnf4m4JR3qLJhAU6w6ksAZ0i4g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tmIEj-0003sO-UM; Sun, 23 Feb 2025 15:06:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76513] [PATCH rust-team 00/77] Add module (gnu packages typst) and packages Resent-From: Andrew Wong <wongandj@icloud.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: divya@subvertising.org, efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Sun, 23 Feb 2025 20:06:01 +0000 Resent-Message-ID: <handler.76513.B.174034111714833@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 76513 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76513@debbugs.gnu.org Cc: Andrew Wong <wongandj@icloud.com>, divya@subvertising.org, efraim@flashner.co.il X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: divya@subvertising.org, efraim@flashner.co.il Received: via spool by submit@debbugs.gnu.org id=B.174034111714833 (code B ref -1); Sun, 23 Feb 2025 20:06:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Feb 2025 20:05:17 +0000 Received: from localhost ([127.0.0.1]:36283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1tmIE0-0003rA-Rn for submit@debbugs.gnu.org; Sun, 23 Feb 2025 15:05:17 -0500 Received: from lists.gnu.org ([2001:470:142::17]:37496) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <wongandj@icloud.com>) id 1tmIDw-0003l9-3r for submit@debbugs.gnu.org; Sun, 23 Feb 2025 15:05:14 -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 <wongandj@icloud.com>) id 1tmIDm-00086d-5o for guix-patches@gnu.org; Sun, 23 Feb 2025 15:05:02 -0500 Received: from qs51p00im-qukt01072702.me.com ([17.57.155.17]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <wongandj@icloud.com>) id 1tmIDk-0004nO-GN for guix-patches@gnu.org; Sun, 23 Feb 2025 15:05:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; bh=jE7tHaf8IYWX1Klc2C8rYnuBhFvxN39liz2zRl2lXiI=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=kTy5ZmgbDyeXLfFkYHshn3Xd3+TJL4UCLDWp69wX4vp5GfHApnlqH2J0YMnA4CxVv UbrNC/Q8rJ71dyFT17P2no3DzU9jR8/6/eSqzq5oX/XNn8VHk905FhHOxjqNV7UfA2 M14/+0jj5zhT5kE1KC3exm/F0rxUavAq9IMzXr2eikqzfNDrkbfJjfDUWRegAwaXpF U3z1DU18SRmhw2PXDr0wC2RDgrYkPobR8xEL6zJ0CA1D6XG7tDML5nP3iQR9pbc7fl RZrTgudusrVvpUby3vJ13UojBoZt9bfRcaHbtPGLn8bjBub7WdnTPxxh/aRe+s6YJW Kl57rZCJiXkgw== Received: from wongworks.lan (qs51p00im-dlb-asmtp-mailmevip.me.com [17.57.155.28]) by qs51p00im-qukt01072702.me.com (Postfix) with ESMTPSA id 4C7EC16800A6; Sun, 23 Feb 2025 20:04:57 +0000 (UTC) Date: Sun, 23 Feb 2025 15:03:06 -0500 Message-ID: <cover.1740340804.git.wongandj@icloud.com> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: mrHLRwBHuttYLWW5DNPQ2yHY5OcsDcrb X-Proofpoint-GUID: mrHLRwBHuttYLWW5DNPQ2yHY5OcsDcrb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-02-23_09,2025-02-20_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 mlxlogscore=498 adultscore=0 spamscore=0 suspectscore=0 clxscore=1015 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2502230158 X-Apple-Remote-Links: v=1;h=KCk=;charset=UTF-8 Received-SPF: pass client-ip=17.57.155.17; envelope-from=wongandj@icloud.com; helo=qs51p00im-qukt01072702.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.01, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Reply-to: Andrew Wong <wongandj@icloud.com> X-ACL-Warn: , Andrew Wong via Guix-patches <guix-patches@gnu.org> From: Andrew Wong via Guix-patches via <guix-patches@gnu.org> 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 |
Series |
Add module (gnu packages typst) and packages
|
|
Message
Andrew Wong
Feb. 23, 2025, 8:03 p.m. UTC
This patch series adds the typesetting system Typst and the module (gnu packages typst) to the rust-team branch. Andrew Wong (77): gnu: rust-diesel-2: Update to 2.2.7. gnu: rust-diesel-derives-2: Update to 2.2.3. gnu: Add rust-diesel-table-macro-syntax-0.2. gnu: Add rust-dsl-auto-type-0.1. gnu: Add rust-mysqlclient-src-0.1. gnu: Add rust-pq-src-0.3. gnu: Add rust-image-webp-0.1. gnu: Add rust-imagesize-0.13. gnu: Add rust-kamadak-exif-0.6. gnu: Add rust-kurbo-0.11. gnu: Add rust-pixglyph-0.5. gnu: Add rust-qcms-0.3. gnu: Add rust-resvg-0.43. gnu: Add rust-rustybuzz-0.18. gnu: Add rust-svg2pdf-0.12. gnu: Add rust-svgtypes-0.15. gnu: Add rust-ttf-parser-0.24. gnu: Add rust-biblatex-0.10. gnu: rust-bitflags-2: Update to 2.8.0. gnu: Add rust-chinese-number-0.7. gnu: Add rust-chinese-variant-1. gnu: Add rust-citationberg-0.5. gnu: Add rust-codex-0.1. gnu: Add rust-comemo-0.4. gnu: Add rust-comemo-macros-0.4. gnu: Add rust-ecow-0.2. gnu: Add rust-dirs-6. gnu: Add rust-fontconfig-parser-0.5. gnu: Add rust-fontdb-0.21. gnu: Add rust-hayagriva-0.8. gnu: Add rust-hypher-0.1. gnu: Add rust-icu-provider-adapters-1. gnu: Add rust-icu-provider-blob-1. gnu: Add rust-icu-segmenter-1. gnu: Add rust-icu-segmenter-data-1. gnu: Add rust-indexmap-nostd-0.4. gnu: Add rust-lipsum-0.9. gnu: Add rust-multi-stash-0.2. gnu: Add rust-mutate-once-0.1. gnu: Add rust-notify-8. gnu: Add rust-notify-types-2. gnu: Add rust-numerals-0.1. gnu: Add rust-openssl-src-300. gnu: Add rust-pdf-writer-0.12. gnu: rust-rust-decimal-1: Update to 1.36.0. gnu: Add rust-self-replace-1. gnu: Add rust-sigpipe-0.1. gnu: Add rust-simplecss-0.2. gnu: Add rust-siphasher-1. gnu: rust-strict-num-0.1: Update to 0.1.1. gnu: Add rust-string-interner-0.17. gnu: Add rust-string-interner-0.18. gnu: Add rust-subsetter-0.2. gnu: rust-two-face-0.4: Update to 0.4.3. gnu: Add rust-unic-langid-0.9. gnu: Add rust-unic-langid-impl-0.9. gnu: Add rust-unic-langid-macros-0.9. gnu: Add rust-unic-langid-macros-impl-0.9. gnu: Add rust-unicode-bidi-mirroring-0.3. gnu: Add rust-unicode-ccc-0.3. gnu: Add rust-unicode-math-class-0.1. gnu: Add rust-unicode-properties-0.1. gnu: Add rust-unicode-script-0.5. gnu: Add rust-unicode-vo-0.1. gnu: Add rust-usvg-0.43. gnu: Add rust-wasmi-0.40. gnu: Add rust-wasmi-0.36. gnu: Add rust-wasmi-collections-0.40. gnu: Add rust-wasmi-collections-0.36. gnu: Add rust-wasmi-core-0.36. gnu: Add rust-wasmi-core-0.40. gnu: Add rust-wasmi-ir-0.40. gnu: Add rust-wasmparser-0.221. gnu: Add rust-wasmparser-nostd-0.100. gnu: Add rust-xmp-writer-0.3. gnu: Add rust-zerotrie-0.1. gnu: Add new module (gnu packages typst). gnu/local.mk | 1 + gnu/packages/crates-database.scm | 99 ++- gnu/packages/crates-graphics.scm | 264 ++++++ gnu/packages/crates-io.scm | 1349 +++++++++++++++++++++++++++++- gnu/packages/typst.scm | 607 ++++++++++++++ 5 files changed, 2296 insertions(+), 24 deletions(-) create mode 100644 gnu/packages/typst.scm base-commit: e0b32172cdbf6f8a77a020f883ece7faa668dc2d
Comments
Hi Andrew,
Andrew Wong <wongandj@icloud.com> skribis:
> This patch series adds the typesetting system Typst and the module (gnu packages typst) to the rust-team branch.
FWIW, Typst is available in Guix-Science, thanks to Alexis Simon (Cc’d).
(I think we have a maintainability problem with Rust packages as it
stands. With cargo2nix among other things, some are experimenting with
simpler and more sustainable ways to provide Rust packages; I hope
that’ll come to fruition.)
Ludo’.
On 2/26/25 5:43p, Ludovic Courtès wrote:> FWIW, Typst is available in Guix-Science, thanks to Alexis Simon (Cc’d). Indeed, I found it there after I made this patch series. I'm working on a v2 which integrates Alexis' work and adds them as a credit. > I think we have a maintainability problem with Rust packages as it > stands.Yeah, I think patch series like these really show the limits of our current system.
See also this PR by @Ingar and the current bug in 0.13 I mention in the last comment https://codeberg.org/guix-science/guix-science/pulls/81 Alexis On 27/02/2025 01:28, Andrew Wong wrote: > On 2/26/25 5:43p, Ludovic Courtès wrote:> FWIW, Typst is available in > Guix-Science, thanks to Alexis Simon (Cc’d). > Indeed, I found it there after I made this patch series. I'm working on > a v2 which integrates Alexis' work and adds them as a credit. > >> I think we have a maintainability problem with Rust packages as it >> stands.Yeah, I think patch series like these really show the limits of >> our > current system.
Hi All, I've been working on implementing Alexis' changes and suggestions. However, I've run into a roadblock regarding the bug you mentioned in version 0.13.0. Though the bug has been fixed a few days ago, trying to build typst from the fixing commit has led me to a few roadblocks, because the git-packaged version of Typst depends on downloading git-packaged versions of its component packages, which I then tried to package themselves but ran up against more roadblocks. Has anyone here successfully packaged rust packages with github dependencies? Any notes/pointers/examples? I tried grepping around guix but couldn't find a good example. So far, I've just been trying to build the release version as retrieved from git, because it only has one git dependency 'rust-typst-dev-assets', but I can't get even that to build, so I am stumped. Is it OK if I just send in the next version of the patch series (with the search path fixes) and either a) allow someone with the skills to implement the fix after the patches are merged or b) wait (or ask) for the typst developers to release a "0.13.1" with the fix?
Hi Andrew, On Sun Mar 2, 2025 at 2:39 AM -03, Andrew Wong via Guix-patches via wrote: > Hi All, > > I've been working on implementing Alexis' changes and suggestions. > However, I've run into a roadblock regarding the bug you mentioned in > version 0.13.0. Though the bug has been fixed a few days ago, trying to > build typst from the fixing commit has led me to a few roadblocks, > because the git-packaged version of Typst depends on downloading > git-packaged versions of its component packages, which I then tried to > package themselves but ran up against more roadblocks. Has anyone here > successfully packaged rust packages with github dependencies? Any > notes/pointers/examples? I tried grepping around guix but couldn't find > a good example. You can try: ------ (snippet #~(begin (use-modules (guix build utils)) (substitute* "Cargo.toml" (("typst-dev-assets = \\{ git =.+") "typst-dev-assets = \"0.13.0\"\n")))) ------ Along with: ------ (arguments '(#:install-source? #f)) ------ It should solve the immediate problem, but might create others, depends on how the rust program does the workspacing, e.g. you might get errors like this: ------ error: manifest path `/path/to/source/Cargo.toml` is a virtual manifest, but this command requires running against an actual package in this workspace ------ > So far, I've just been trying to build the release version as retrieved > from git, because it only has one git dependency > 'rust-typst-dev-assets', but I can't get even that to build, so I am > stumped. Building the package directly from git (with git as a source) is different than using crate-uri as a source. Reason being crates.io (or cargo in the broader instance) does something called 'normalization' to its workspace packages, and, as a consequence, dependencies, before shipping them as a '.crate' file. The crates.io registry might not even ship 'typst-dev-assets' in this case, since its a dev dependency (this is why it builds fine when using crate-uri instead of git-reference). What this means in practice, without diving into cargo-build-system too deep, is it converts a 'virtual manifest' to actual packages that can be worked on using subsequent cargo subcommands (like 'cargo package'). AFAIK (and I'd be really happy to be proved wrong here!), theres no easy way to do this normalization without internet access, or without lock files (which currently gets deleted by the cargo-build-system). I wish I could give you any reference links to read or prove my statements, however this is all from my own experience packaging rust, and many failed attempts on even harder packages. Back to your original problem, I think these steps would do the trick: 1. Remove the hard-dependency on git with the above substitute* snippet; 2. #:install-source? #f as the package argument; 3. Replace the 'install phase with your own that installs the files. Not that you have to do it (see the "option 'c'" below), but just giving you one (of many) ways to solve this specific problem if you/anyone reading this finds it useful (specially for packaging crates that are not in crates.io). > Is it OK if I just send in the next version of the patch series > (with the search path fixes) and either a) allow someone with the skills > to implement the fix after the patches are merged or b) wait (or ask) > for the typst developers to release a "0.13.1" with the fix? I don't know the proper guix procedure for this case, sorry. However I can suggest applying the specific commit [1] from the fix PR [2] as a guix patch - could be an option "c" :) Best regards, Murilo [1] https://github.com/typst/typst/commit/acd3a5b7a5999d22fbf2da488744d564b2f3638e [2] https://github.com/typst/typst/pull/5905