[PATCH] gnu: typst: Add package and dependencies.

  • Open
  • quality assurance status badge
Details
One participant
  • Ethan Reece
Owner
unassigned
Submitted by
Ethan Reece
Severity
normal
E
E
Ethan Reece wrote on 7 Aug 01:06 +0200
(address . guix-patches@gnu.org)(name . Ethan Reece)(address . git@ethanreece.com)
20240806230845.7790-1-git@ethanreece.com
Hello,

This patch aims to package Typst and its dependencies.

Steps I took:
- `./pre-inst-env guix import -i gnu/packages/crates-io.scm crate --recursive --recursive-dev-dependencies --allow-yanked typst-cli`
- Moved `rust-typst-cli-0.11` to `typst` in a new file that should have other Typst packages from Typst Universe in the future.
- Successfully ran `./pre-inst-env guix build` on a manifest containing all of the added dependencies, and disabled tests for dependencies where tests failed (my computer uses aarch64).

Steps I haven't taken:
- Test build for platforms other than aarch64.
- Test modifications to dependencies of other packages (I am not sure how to do this for cargo-build-system)

Dependencies added (to my knowledge):
typst-0.11
rust-comemo-0.4
rust-ecow-0.2
rust-fontdb-0.16
rust-self-replace-1
rust-typst-0.11
rust-typst-assets-0.11
rust-typst-macros-0.11
rust-typst-pdf-0.11
rust-typst-render-0.11
rust-typst-svg-0.11
rust-typst-timing-0.11
rust-comemo-macros-0.4
rust-siphasher-1
rust-fontconfig-parser-0.5
rust-ttf-parser-0.20
rust-roxmltree-0.20
rust-xmlwriter-0.1
rust-chinese-number-0.7
rust-hayagriva-0.5
rust-hypher-0.1
rust-icu-properties-1
rust-icu-provider-1
rust-icu-provider-adapters-1
rust-icu-provider-blob-1
rust-icu-segmenter-1
rust-kamadak-exif-0.5
rust-kurbo-0.9
rust-lipsum-0.9
rust-qcms-0.3
rust-rustybuzz-0.12
rust-two-face-0.3
rust-typst-syntax-0.11
rust-unicode-math-class-0.1
rust-unicode-script-0.5
rust-usvg-0.38
rust-wasmi-0.31
rust-chinese-variant-1
rust-enum-ordinalize-4
rust-assert-eq-float-0.1
rust-enum-ordinalize-derive-4
rust-biblatex-0.9
rust-citationberg-0.3
rust-numerals-0.1
rust-unic-langid-0.9
rust-unscanny-0.1
rust-unic-langid-impl-0.9
rust-unic-langid-macros-0.9
rust-tinystr-0.7
rust-databake-0.1
rust-zerovec-0.10
rust-databake-derive-0.1
rust-synstructure-0.13
rust-yoke-0.7
rust-zerofrom-0.1
rust-zerovec-derive-0.10
rust-rmp-serde-1
rust-yoke-derive-0.7
rust-zerofrom-derive-0.1
rust-rmp-0.8
rust-unic-langid-macros-impl-0.9
rust-icu-collections-1
rust-icu-locid-transform-1
rust-icu-properties-data-1
rust-icu-locid-1
rust-icu-locid-transform-data-1
rust-litemap-0.7
rust-writeable-0.5
rust-icu-provider-macros-1
rust-zerotrie-0.1
rust-core-maths-0.1
rust-icu-segmenter-data-1
rust-utf8-iter-1
rust-mutate-once-0.1
rust-unicode-bidi-mirroring-0.1
rust-unicode-ccc-0.1
rust-unicode-properties-0.1
rust-usvg-parser-0.38
rust-usvg-text-layout-0.38
rust-usvg-tree-0.38
rust-imagesize-0.12
rust-simplecss-0.2
rust-svgtypes-0.13
rust-roxmltree-0.7
rust-xmlparser-0.10
rust-strict-num-0.1
rust-unicode-vo-0.1
rust-wasmi-arena-0.4
rust-wasmi-core-0.13
rust-wasmparser-nostd-0.100
rust-wast-62
rust-wat-1
rust-indexmap-nostd-0.4
rust-wasm-encoder-0.31
rust-wast-215
rust-bumpalo-3
rust-gimli-0.30
rust-wasm-encoder-0.215
rust-serde-json-1
rust-wasmparser-0.215
rust-ahash-0.8
rust-pcg-mwc-0.2
rust-pdf-writer-0.9
rust-subsetter-0.1
rust-svg2pdf-0.10
rust-xmp-writer-0.2
rust-ttf-parser-0.15
rust-resvg-0.38
rust-pixglyph-0.3
rust-xmlparser-0.13

Dependencies updated:
rust-ahash-0.8
rust-bumpalo-3
rust-rmp-0.8
rust-rmp-serde-1
rust-serde-json-1
rust-strict-num-0.1
rust-xmlparser-0.13

- Ethan

Change-Id: I13741b2af2bb734362250ca0a568709aa6be8a78
---
gnu/local.mk | 2 +
gnu/packages/crates-io.scm | 2727 ++++++++++++++++++++++++++++++++++--
gnu/packages/typst.scm | 90 ++
3 files changed, 2718 insertions(+), 101 deletions(-)
create mode 100644 gnu/packages/typst.scm

Toggle diff (389 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 6d2b14e72d..f8cd91f6ef 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -66,6 +66,7 @@
# Copyright © 2023 Troy Figiel <troy@troyfigiel.com>
# Copyright © 2024 David Elsing <david.elsing@posteo.net>
# Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
+# Copyright © 2024 Ethan Reece <guix@ethanreece.com>
#
# This file is part of GNU Guix.
#
@@ -652,6 +653,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/toolkits.scm \
%D%/packages/tor-browsers.scm \
%D%/packages/tor.scm \
+ %D%/packages/typst.scm \
%D%/packages/tree-sitter.scm \
%D%/packages/tv.scm \
%D%/packages/uglifyjs.scm \
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 22c6136852..fe140fd65b 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -44,6 +44,7 @@
;;; Copyright © 2024 Suhail Singh <suhail@bayesians.ca>
;;; Copyright © 2024 Aaron Covrig <aaron.covrig.us@ieee.org>
;;; Copyright © 2024 Nguy?n Gia Phong <mcsinyx@disroot.org>
+;;; Copyright © 2024 Ethan Reece <guix@ethanreece.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -791,41 +792,41 @@ (define-public rust-afl-0.11
(define-public rust-ahash-0.8
(package
(name "rust-ahash")
- (version "0.8.7")
- (source (origin
- (method url-fetch)
- (uri (crate-uri "ahash" version))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "008xw6gigwnf0q01ic4ar2y4dqfnzn3kyys6vd4cvfa3imjakhvp"))))
+ (version "0.8.11")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "ahash" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "04chdfkls5xmhp1d48gnjsmglbqibizs3bpbj6rsj604m10si7g8"))))
(build-system cargo-build-system)
(arguments
- `(#:cargo-inputs
- (("rust-atomic-polyfill" ,rust-atomic-polyfill-1)
- ("rust-cfg-if" ,rust-cfg-if-1)
- ("rust-const-random" ,rust-const-random-0.1)
- ("rust-getrandom" ,rust-getrandom-0.2)
- ("rust-once-cell" ,rust-once-cell-1)
- ("rust-serde" ,rust-serde-1)
- ("rust-version-check" ,rust-version-check-0.9)
- ("rust-zerocopy" ,rust-zerocopy-0.7))
- #:cargo-development-inputs
- (("rust-criterion" ,rust-criterion-0.3)
- ("rust-fnv" ,rust-fnv-1)
- ("rust-fxhash" ,rust-fxhash-0.2)
- ("rust-hashbrown" ,rust-hashbrown-0.12)
- ("rust-hex" ,rust-hex-0.4)
- ("rust-no-panic" ,rust-no-panic-0.1)
- ("rust-rand" ,rust-rand-0.8)
- ("rust-seahash" ,rust-seahash-4)
- ("rust-serde-json" ,rust-serde-json-1))))
+ `(#:cargo-inputs (("rust-atomic-polyfill" ,rust-atomic-polyfill-1)
+ ("rust-cfg-if" ,rust-cfg-if-1)
+ ("rust-const-random" ,rust-const-random-0.1)
+ ("rust-getrandom" ,rust-getrandom-0.2)
+ ("rust-once-cell" ,rust-once-cell-1)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-version-check" ,rust-version-check-0.9)
+ ("rust-zerocopy" ,rust-zerocopy-0.7))
+ #:cargo-development-inputs (("rust-criterion" ,rust-criterion-0.3)
+ ("rust-fnv" ,rust-fnv-1)
+ ("rust-fxhash" ,rust-fxhash-0.2)
+ ("rust-hashbrown" ,rust-hashbrown-0.14)
+ ("rust-hex" ,rust-hex-0.4)
+ ("rust-no-panic" ,rust-no-panic-0.1)
+ ("rust-pcg-mwc" ,rust-pcg-mwc-0.2)
+ ("rust-rand" ,rust-rand-0.8)
+ ("rust-seahash" ,rust-seahash-4)
+ ("rust-serde-json" ,rust-serde-json-1)
+ ("rust-smallvec" ,rust-smallvec-1))))
(home-page "https://github.com/tkaitchuck/ahash")
(synopsis
- "Non-cryptographic hash function using AES-NI")
+ "non-cryptographic hash function using AES-NI for high performance")
(description
- "This package provides a non-cryptographic hash function using AES-NI for
-high performance.")
+ "This package provides a non-cryptographic hash function using AES-NI for high
+performance.")
(license (list license:expat license:asl2.0))))
(define-public rust-ahash-0.7
@@ -4444,6 +4445,27 @@ (define-public rust-assert-cmd-0.9
#:cargo-development-inputs
(("rust-docmatic" ,rust-docmatic-0.1))))))
+(define-public rust-assert-eq-float-0.1
+ (package
+ (name "rust-assert-eq-float")
+ (version "0.1.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "assert-eq-float" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1y2hb46hm4cvxxy0bwng9gv4vq48i4scynflhqr5d2ijwzsd3c8w"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs (("rust-num-traits" ,rust-num-traits-0.2))))
+ (home-page "https://magiclen.org/assert-eq-float")
+ (synopsis
+ "This crate provides the `assert_eq_float!` macros that support floats")
+ (description
+ "This crate provides the `assert_eq_float!` macros that support floats.")
+ (license license:expat)))
+
(define-public rust-assert-float-eq-1
(package
(name "rust-assert-float-eq")
@@ -7040,6 +7062,31 @@ (define-public rust-better-panic-0.3
(description "Pretty panic backtraces inspired by Python's tracebacks.")
(license license:expat)))
+(define-public rust-biblatex-0.9
+ (package
+ (name "rust-biblatex")
+ (version "0.9.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "biblatex" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1f5py80y8aj3yibsd9gcffvg0i1zg32f35akig6jf0hd0j2p5zi7"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs (("rust-numerals" ,rust-numerals-0.1)
+ ("rust-paste" ,rust-paste-1)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-strum" ,rust-strum-0.26)
+ ("rust-unicode-normalization" ,rust-unicode-normalization-0.1)
+ ("rust-unscanny" ,rust-unscanny-0.1))))
+ (home-page "https://github.com/typst/biblatex")
+ (synopsis "Parsing, writing, and evaluating BibTeX and BibLaTeX files")
+ (description
+ "This package provides Parsing, writing, and evaluating @code{BibTeX} and @code{BibLaTeX} files.")
+ (license (list license:expat license:asl2.0))))
+
(define-public rust-bigdecimal-0.4
(package
(name "rust-bigdecimal")
@@ -9730,30 +9777,29 @@ (define-public rust-built-0.5
(define-public rust-bumpalo-3
(package
(name "rust-bumpalo")
- (version "3.13.0")
+ (version "3.16.0")
(source
(origin
(method url-fetch)
(uri (crate-uri "bumpalo" version))
- (file-name
- (string-append name "-" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
- (base32
- "1h9zmxb9d14m2sx34daz88fsjw1lx7d5mhaqbldwqgl8xzdc7qm3"))))
+ (base32 "0b015qb4knwanbdlp1x48pkb4pm57b8gidbhhhxr900q2wb6fabr"))))
(build-system cargo-build-system)
(arguments
- `(#:tests? #f ; Not all files included.
- #:cargo-inputs
- (("rust-allocator-api2" ,rust-allocator-api2-0.2))
- #:cargo-development-inputs
- (("rust-criterion" ,rust-criterion-0.3)
- ("rust-quickcheck" ,rust-quickcheck-1)
- ("rust-rand" ,rust-rand-0.8))))
+ `(#:tests? #f ; No such file or directory
+ #:cargo-inputs (("rust-allocator-api2" ,rust-allocator-api2-0.2)
+ ("rust-serde" ,rust-serde-1))
+ #:cargo-development-inputs (("rust-criterion" ,rust-criterion-0.3)
+ ("rust-quickcheck" ,rust-quickcheck-1)
+ ("rust-rand" ,rust-rand-0.8)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-json" ,rust-serde-json-1))))
(home-page "https://github.com/fitzgen/bumpalo")
- (synopsis "Fast bump allocation arena for Rust")
+ (synopsis "fast bump allocation arena for Rust.")
(description
"This package provides a fast bump allocation arena for Rust.")
- (license (list license:asl2.0 license:expat))))
+ (license (list license:expat license:asl2.0))))
(define-public rust-bv-0.11
(package
@@ -12221,6 +12267,52 @@ (define-public rust-charset-0.1
Encoding Standard.")
(license (list license:expat license:asl2.0))))
+(define-public rust-chinese-number-0.7
+ (package
+ (name "rust-chinese-number")
+ (version "0.7.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "chinese-number" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0v5va8drix8gs2kv6pmv5yzdxhlpzrwkp3ch86kxdxj6cgpwmz29"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs (("rust-chinese-variant" ,rust-chinese-variant-1)
+ ("rust-enum-ordinalize" ,rust-enum-ordinalize-4)
+ ("rust-num-bigint" ,rust-num-bigint-0.4)
+ ("rust-num-traits" ,rust-num-traits-0.2))
+ #:cargo-development-inputs (("rust-assert-eq-float" ,rust-assert-eq-float-0.1))))
+ (home-page "https://magiclen.org/chinese-number")
+ (synopsis
+ "Convert primitive numbers to Chinese numbers, or parse Chinese numbers to primitive numbers")
+ (description
+ "This package provides Convert primitive numbers to Chinese numbers, or parse Chinese numbers to
+primitive numbers.")
+ (license license:expat)))
+
+(define-public rust-chinese-variant-1
+ (package
+ (name "rust-chinese-variant")
+ (version "1.1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "chinese-variant" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "12s91vg2m9wfs9b3f0q2alj9am08y7r2prb0szg3fwjh8m8lg23m"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs (("rust-enum-ordinalize" ,rust-enum-ordinalize-4))))
+ (home-page "https://magiclen.org/chinese-variant")
+ (synopsis "An enum to represent the variants of the Chinese Language")
+ (description
+ "This package provides An enum to represent the variants of the Chinese Language.")
+ (license license:expat)))
+
(define-public rust-chrono-0.4
(package
(name "rust-chrono")
@@ -12564,6 +12656,31 @@ (define-public rust-ci-info-0.3
"This package provides current CI environment information.")
(license license:asl2.0)))
+(define-public rust-citationberg-0.3
+ (package
+ (name "rust-citationberg")
+ (version "0.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "citationberg" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "02rx28ar1yqzfh97n18ihd1bmgshvgyj07aq36hhbylgsygzwnfj"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:tests? #f ; No such file or directory
+ #:cargo-inputs (("rust-quick-xml" ,rust-quick-xml-0.31)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-unscanny" ,rust-unscanny-0.1))
+ #:cargo-development-inputs (("rust-ciborium" ,rust-ciborium-0.2)
+ ("rust-serde-json" ,rust-serde-json-1)
+ ("rust-serde-path-to-error" ,rust-serde-path-to-error-0.1))))
+ (home-page "https://github.com/typst/citationberg")
+ (synopsis "parser for CSL files")
+ (description "This package provides a parser for CSL files.")
+ (license (list license:expat license:asl2.0))))
+
(define-public rust-clang-ast-0.1
(package
(name "rust-clang-ast")
@@ -14123,6 +14240,52 @@ (define-public rust-combine-regex-1-1
and 1.0.")
(license (list license:expat license:asl2.0))))
+(define-public rust-comemo-0.4
+ (package
+ (name "rust-comemo")
+ (version "0.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "comemo" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "14bsiayib4lhz3jrbf1fqh2fpwsm6cii90mifym3jhvji901csfz"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs (("rust-comemo-macros" ,rust-comemo-macros-0.4)
+ ("rust-once-cell" ,rust-once-cell-1)
+ ("rust-parking-lot" ,rust-parking-lot-0.12)
+ ("rust-siphasher" ,rust-siphasher-1))
+ #:cargo-development-inputs (("rust-serial-test" ,rust-serial-test-3))))
+ (home-page "https://github.com/typst/comemo")
+ (synopsis "Incremental computation through constrained memoization")
+ (description
+ "This package provides Incremental computation through constrained memoization.")
+ (license (list license:expat license:asl2.0))))
+
+(define-public rust-comemo-macros-0.4
+ (package
+ (name "rust-comemo-macros")
+ (version "0.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "comemo-macros" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1nr8w81hkzg49s515v61shxb077iq6d6001pybxbvxdlz516x4y8"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:tests? #f ; failed to resolve: use of undeclared crate or module `comemo`
+ #:cargo-inputs (("rust-proc-macro2" ,rust-proc-macro2-1)
+ ("rust-quote" ,rust-quote-1)
+ ("rust-syn" ,rust-syn-2))))
+ (home-page "https://github.com/typst/comemo")
+ (synopsis "Procedural macros for comemo")
+ (description "This package provides Procedural macros for comemo.")
+ (license (list license:expat license:asl2.0))))
+
(define-public rust-comfy-table-7
(package
(name "rust-comfy-table")
@@ -16095,6 +16258,27 @@ (define-public rust-core-extensions-proc-macros-1
(description "Implementation detail of the @code{core_extensions} crate.")
(license (list license:expat license:asl2.0))))
+(define-public rust-core-maths-0.1
+ (package
+ (name "rust-core-maths")
+ (version "0.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "core_maths" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "18q9fwy80lk1lccam375skmsslryik00zkhsl850pidqrh2jbc73"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs (("rust-libm" ,rust-libm-0.2))))
+ (home-page "https://github.com/robertbastian/core_maths")
+ (synopsis
+ "Extension trait for full float functionality in `#[no_std]` backed by `libm`")
+ (description
+ "This package provides Extension trait for full float functionality in `#[no_std]` backed by `libm`.")
+ (license license:expat)))
+
(define-public rust-core2-0.4
(package
(name "rust-core2")
@@ -19594,6 +19778,53 @@ (define-public rust-data-url-0.2
("rust-serde-json" ,rust-serde-json-1)
("rust-tester" ,rust-tester-0.9))))))
+(define-public rust-databake-0.1
+ (package
+ (name "rust-databake")
+ (version "0.1.8")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "databake" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0kb0lnhka1fklrii3qaj
This message was truncated. Download the full message here.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 72506@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72506
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch