diff options
| author | Andrew Wong <wongandj@icloud.com> | 2025-06-06 13:46:44 -0400 |
|---|---|---|
| committer | Hilton Chain <hako@ultrarare.space> | 2025-08-21 19:09:00 +0800 |
| commit | 21f0fc6329431a5e0dd24ee7e1d8370605789db5 (patch) | |
| tree | 177b098f40fd33afc903538444c09c7e8ef96bd4 /gnu | |
| parent | 33399ab9311d54414143502b43098127ebb51f82 (diff) | |
gnu: Add rust-hypher-0.1.
* gnu/packages/rust-sources.scm (rust-hypher-0.1): New variable.
Change-Id: I4021e515c7b3d730850a139816a822521ef7df56
Signed-off-by: Hilton Chain <hako@ultrarare.space>
Modified-by: Hilton Chain <hako@ultrarare.space>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/rust-sources.scm | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/rust-sources.scm b/gnu/packages/rust-sources.scm index 709d728b07d..bb8f0bc1258 100644 --- a/gnu/packages/rust-sources.scm +++ b/gnu/packages/rust-sources.scm @@ -123,6 +123,49 @@ transliterating them. It supports Emoji and Chinese.") (license license:bsd-3)))) +(define-public rust-hypher-0.1 + (hidden-package + (package + (name "rust-hypher") + (version "0.1.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/typst/hypher") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1r01hhgxp5fmz1bgy11ilajd67lgfh7kqvd258c58c6y3w3rxpjq")) + (modules '((guix build utils))) + ;; Pre-generated. + (snippet '(for-each delete-file (find-files "tries"))))) + (build-system cargo-build-system) + (arguments + (list + #:skip-build? #t + #:cargo-package-crates ''("hypher") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'regenerate + (lambda _ + ;; Stop the attempted dependency retrieval for a bench-marking + ;; tool. + (substitute* "Cargo.toml" (("^members.+$") "")) + ;; --no-default-features lets us avoid using the upstream + ;; source's pre-generated tries when running the + ;; trie-regenerating "generate" test. We are throwing library + ;; binary away, anyways, because we only want the source. + ;; See also: <https://github.com/typst/hypher/issues/19>. + (false-if-exception + (invoke "cargo" "test" "--test" "generate" + "--no-default-features")) + (delete-file-recursively "target")))))) + (home-page "https://github.com/typst/hypher") + (synopsis "Separate words into syllables") + (description "@code{hypher} is a Rust library for syllabification.") + (license (list license:expat license:asl2.0))))) + (define-public rust-pcre2-utf32-0.2 (hidden-package (package |
