Subject: [PATCH 2/2] gnu: Add hex.

From: jgart <[email-masked]>
Date: Sun, 5 Dec 2021 04:53:12 -0500

* gnu/packages/rust-apps.scm (hex): New variable.
---
 gnu/packages/rust-apps.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 6ce98610f5..8634356ccd 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -857,6 +857,37 @@ (define-public tectonic
 of support files.")
     (license license:expat)))
 
+(define-public hex
+  (package
+    (name "hex")
+    (version "0.4.2")
+    (source
+     (origin
+       ;; crates.io does not provide the test data.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/sitkevij/hex")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "03x27nixdlnkkrh85gy4152arp02kpjwq0i9dn9p73lyr24s64lv"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:cargo-inputs
+        (("rust-ansi-term" ,rust-ansi-term-0.12)
+         ("rust-atty" ,rust-atty-0.2)
+         ("rust-clap" ,rust-clap-2)
+         ("rust-no-color" ,rust-no-color-0.1))
+        #:cargo-development-inputs
+        (("rust-assert-cmd" ,rust-assert-cmd-1))))
+    (home-page "https://github.com/sitkevij/hex")
+    (synopsis "Futuristic take on hexdump")
+    (description
+"@command{hx} accepts a file path as input and outputs a hexadecimal
+colorized view to stdout.")
+    (license license:expat)))
+
 (define-public tokei
   (package
     (name "tokei")
-- 
2.34.0