* gnu/packages/rust.scm (rust-encoding): New variable. --- gnu/packages/rust.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index e9b2a84bf..f68e1ceb0 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -1069,3 +1069,33 @@ which is providing character encoding support for Rust.") Chinese character encodings. This package is part of the crate \"encoding\", which is providing character encoding support for Rust.") (license license:cc0))) + +(define-public rust-encoding + (package + (name "rust-encoding") + (version "0.2.33") + (source + (origin + (method url-fetch) + (uri (crate-uri "encoding" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1v1ndmkarh9z3n5hk53da4z56hgk9wa5kcsm7cnx345raqw983bb")))) + (build-system cargo-build-system) + (native-inputs + `(("rust-getopts" ,rust-getopts "src"))) + (inputs + `(("rust-encoding-index-japanese" ,rust-encoding-index-japanese "src") + ("rust-encoding-index-korean" ,rust-encoding-index-korean "src") + ("rust-encoding-index-simpchinese" ,rust-encoding-index-simpchinese "src") + ("rust-encoding-index-singlebyte" ,rust-encoding-index-singlebyte "src") + ("rust-encoding-index-tradchinese" ,rust-encoding-index-tradchinese "src"))) + (home-page "https://github.com/lifthrasiir/rust-encoding") + (synopsis "Character encoding support for Rust") + (description + "@code{encoding} adds character encoding support for Rust. It is +based on WHATWG Encoding Standard, and also provides an advanced +interface for error detection and recovery.") + (license license:expat))) -- 2.11.0