diff mbox series

[bug#59111,2/2] gnu: Add htmlq.

Message ID 41ca4e09bc7e9d131d53bdd166f2e4c5e3d14915.1667851396.git.code@greghogan.com
State New
Headers show
Series Add htmlq. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success
cbaines/issue success View issue

Commit Message

Greg Hogan Nov. 7, 2022, 8:05 p.m. UTC
* gnu/packages/rust-apps.scm (htmlq): New variable.
---
 gnu/packages/rust-apps.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 693489264d..b7c3e67ee6 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -20,6 +20,7 @@ 
 ;;; Copyright © 2022 Gabriel Arazas <foo.dogsquared@gmail.com>
 ;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2022 Mathieu Laparie <mlaparie@disr.it>
+;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2062,3 +2063,27 @@  (define-public zoxide
 track of the directories you use most frequently, and uses a ranking algorithm
 to navigate to the best match.")
     (license license:expat)))
+
+(define-public htmlq
+  (package
+    (name "htmlq")
+    (version "0.4.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "htmlq" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "0912cdkz5xji1hzfj1cf42zh1kd860b52xmwwhb7q2jhp6qk25jh"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:cargo-inputs
+        (("rust-clap" ,rust-clap-2)
+         ("rust-html5ever" ,rust-html5ever-0.25)
+         ("rust-kuchiki" ,rust-kuchiki-0.8)
+         ("rust-lazy-static" ,rust-lazy-static-1)
+         ("rust-url" ,rust-url-2))))
+    (home-page "https://github.com/mgdm/htmlq")
+    (synopsis "Like jq, but for HTML")
+    (description "Extract content from HTML files using CSS selectors.")
+    (license license:expat)))