Subject: bug#54085: closed (RE: Add jless to Guix)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 23 Mar 2025 00:53:11 +0000

Your bug report

#54085: [PATCH 3/3] gnu: Add jless.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
54085: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54085
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: RE: Add jless to Guix
From: Steve George <[email-masked]>
To: [email-masked]
Date: Sun, 23 Mar 2025 00:52:05 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Petr,

Thanks for submitting jless to be adding to Guix. I updated the patch to a later version and committed it to the rust-team branch in b8692833d2f257e263efcc7552387f7887d2973a

Steve / Futurile

Subject: [PATCH 3/3] gnu: Add jless.
From: phodina <[email-masked]>
To: Guix Patches <[email-masked]>
Date: Mon, 21 Feb 2022 09:48:10 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

These patches add JSON viewer in Rust.

----
Petr

From 2c94882dc4eb680bc26b51b7b4d0eca393e4a55c Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Wed, 16 Feb 2022 02:01:04 +0100
Subject: [PATCH 1/3] gnu: Add rust-logos-derive-0.12.

* gnu/packages/crates-io.scm (rust-logos-derive-0.12): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 2e176eeb54..ae46f59198 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -32394,6 +32394,33 @@ (define-public rust-log4rs-1
 logging implementation for the `log` facade.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-logos-derive-0.12
+  (package
+    (name "rust-logos-derive")
+    (version "0.12.0")
+    (source (origin
+              (method url-fetch)
+              (uri (crate-uri "logos-derive" version))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0vf38d1pvy3w7qdpl7yr9ds5azaahy51r6pi25dzghrazn3x59sn"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs
+       (("rust-beef" ,rust-beef-0.5) ("rust-fnv" ,rust-fnv-1)
+        ("rust-proc-macro2" ,rust-proc-macro2-1)
+        ("rust-quote" ,rust-quote-1)
+        ("rust-regex-syntax" ,rust-regex-syntax-0.6)
+        ("rust-syn" ,rust-syn-1)
+        ("rust-utf8-ranges" ,rust-utf8-ranges-1))))
+    (home-page "https://github.com/maciejhirsz/logos")
+    (synopsis "Macros for deriving common traits for fast Lexers")
+    (description "This package provides macros for deriving common traits for
+fast Lexers.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-logtest-2
   (package
     (name "rust-logtest")
-- 
2.34.0

From b15f96c2f1005acbe45ec59675f1b58861cae1b1 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Wed, 16 Feb 2022 02:02:29 +0100
Subject: [PATCH 2/3] gnu: Add rust-logos-0.12.

* gnu/packages/crates-io.scm (rust-logos-0.12): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index ae46f59198..d825076a19 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -32394,6 +32394,28 @@ (define-public rust-log4rs-1
 logging implementation for the `log` facade.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-logos-0.12
+  (package
+    (name "rust-logos")
+    (version "0.12.0")
+    (source (origin
+              (method url-fetch)
+              (uri (crate-uri "logos" version))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0idklzd8afh87c82n3yp3l0djjmkwrsginxgm5ni64xylny2lzj2"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs
+       (("rust-logos-derive" ,rust-logos-derive-0.12))))
+    (home-page "https://github.com/maciejhirsz/logos")
+    (synopsis "Generate fast Lexers")
+    (description "This package provides easy way to generate fast
+Lexers.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-logos-derive-0.12
   (package
     (name "rust-logos-derive")
-- 
2.34.0

From 0cd53505fbfd6e69a0ec227e92df3c9b35a0b310 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Wed, 16 Feb 2022 02:34:10 +0100
Subject: [PATCH 3/3] gnu: Add jless.

* gnu/packages/rust-apps.scm (jless): New variable.

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index bb59f6b448..f77f9513f6 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -12,7 +12,7 @@
 ;;; Copyright © 2021, 2022 Zheng Junjie <[email-masked]>
 ;;; Copyright © 2021 Alexandru-Sergiu Marton <[email-masked]>
 ;;; Copyright © 2021 Maxim Cournoyer <[email-masked]>
-;;; Copyright © 2021 Petr Hodina <[email-masked]>
+;;; Copyright © 2021, 2022 Petr Hodina <[email-masked]>
 ;;; Copyright © 2021 jgart <[email-masked]>
 ;;; Copyright © 2021 Nicolas Graves <[email-masked]>
 ;;; Copyright © 2022 Aleksandr Vityazev <[email-masked]>
@@ -706,6 +706,50 @@ (define-public i3status-rust
 bar.  It is also compatible with sway.")
     (license license:gpl3)))
 
+(define-public jless
+  (package
+    (name "jless")
+    (version "0.7.1")
+    (source (origin
+              (method url-fetch)
+              (uri (crate-uri "jless" version))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0sz93gvingvxj68sxfbl8a0p8rmx46bdnw0a2hbm0fh38jx3xdzr"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs (("rust-atty" ,rust-atty-0.2)
+                       ("rust-lazy-static" ,rust-lazy-static-1)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-logos" ,rust-logos-0.12)
+                       ("rust-regex" ,rust-regex-1)
+                       ("rust-rustyline" ,rust-rustyline-9)
+                       ("rust-signal-hook" ,rust-signal-hook-0.3)
+                       ("rust-structopt" ,rust-structopt-0.3)
+                       ("rust-termion" ,rust-termion-1)
+                       ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
+                       ("rust-unicode-width" ,rust-unicode-width-0.1))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-version-requirements
+           (lambda _
+             ;; isatty crate is deprecated use atty instead
+             (substitute* "src/main.rs"
+               (("isatty::stdout_isatty\\(") "atty::is(atty::Stream::Stdout")
+               (("isatty::stdin_isatty\\(") "atty::is(atty::Stream::Stdin"))
+             ;; fix requirement versions
+             (substitute* "Cargo.toml"
+               (("isatty") "atty")
+               (("1.5.6") ,(package-version rust-termion-1))
+               (("\"0.1\"") (string-append "\""
+                                           ,(package-version rust-atty-0.2)
+                                           "\""))) #t)))))
+    (home-page "https://github.com/PaulJuliusMartinez/jless")
+    (synopsis "Command-line JSON viewer")
+    (description "This package provides a command-line JSON viewer.")
+    (license license:expat)))
+
 (define-public ripgrep
   (package
     (name "ripgrep")
-- 
2.34.0