Subject: [PATCH v2 25/52] gnu: Add rust-ammonia-3.

From: Leo Prikler <[email-masked]>
Date: Sun, 28 Feb 2021 23:37:45 +0100

* gnu/packages/crates-io.scm (rust-ammonia-3): New variable.
---
 gnu/packages/crates-io.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index b741e6c7c1..78f6a2d8d8 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -1700,6 +1700,40 @@ options to use calloc or a mutable global variable for pre-zeroed memory.")
 be used with the stdlib.")
     (license license:bsd-3)))
 
+(define-public rust-ammonia-3
+  (package
+    (name "rust-ammonia")
+    (version "3.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "ammonia" version))
+        (file-name
+          (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32
+            "0fzaj1fx3yhz2qd47gfvz7n8xjrnn37w2hp4qlyzpczlf18wisl9"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-html5ever" ,rust-html5ever-0.25)
+        ("rust-lazy-static" ,rust-lazy-static-1)
+        ("rust-maplit" ,rust-maplit-1)
+        ("rust-markup5ever-rcdom"
+         ,rust-markup5ever-rcdom-0.1)
+        ("rust-matches" ,rust-matches-0.1)
+        ("rust-tendril" ,rust-tendril-0.4)
+        ("rust-url" ,rust-url-2))
+       #:cargo-development-inputs
+       (("rust-version-sync" ,rust-version-sync-0.8))))
+    (home-page "https://github.com/rust-ammonia/ammonia")
+    (synopsis "HTML Sanitization")
+    (description "Ammonia is a whitelist-based HTML sanitization library.
+It is designed to prevent cross-site scripting, layout breaking, and
+clickjacking caused by untrusted user-provided HTML being mixed into a larger
+web page.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-android-glue-0.2
   (package
     (name "rust-android-glue")
-- 
2.30.1