unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: phodina via Guix-patches via <guix-patches@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 54085@debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#54085] [PATCH 3/3] gnu: Add jless.
Date: Mon, 21 Nov 2022 16:14:56 +0000	[thread overview]
Message-ID: <U7rt2lb4CKr5h0RCxC0rVmWuLfmRrz5MZWq6kDYtmjmchz62tnupbhd1NfXT6oZnG4NTxRxv5LiNNiP2DIIyyiTlg4pnBplChRgTBse4nH0=@protonmail.com> (raw)
In-Reply-To: <827c57dd-7d1d-1fb7-7479-4e9804908fdf@telenet.be>

[-- Attachment #1: Type: text/plain, Size: 103 bytes --]

Hi Maxim and Maxime,

Here are the patches. Should have the issues you mentioned fixed.

----
Petr

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: v2-0003-gnu-Add-jless.patch --]
[-- Type: text/x-patch; name=v2-0003-gnu-Add-jless.patch, Size: 2692 bytes --]

From 150174567fc97bd2afb99a583e1cf498a83e2120 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Wed, 16 Feb 2022 02:34:10 +0100
Subject: [PATCH v2 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 693489264d..379e49bcc1 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -709,6 +709,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.38.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: v2-0002-gnu-Add-rust-logos-0.12.patch --]
[-- Type: text/x-patch; name=v2-0002-gnu-Add-rust-logos-0.12.patch, Size: 1744 bytes --]

From 82925c0d7d30ac0fe780d99877f2589b5e8cd88e Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Wed, 16 Feb 2022 02:02:29 +0100
Subject: [PATCH v2 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 1cbe7d4798..8bc1031e22 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -30738,6 +30738,33 @@ (define-public rust-log-0.3
      `(#:cargo-inputs
        (("rust-log" ,rust-log-0.4))))))
 
+(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
+     `(#: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:
+@itemize
+@item Combines all token definitions into a single deterministic state machine
+@item Optimizes branches into lookup tables or jump tables
+@item Prevents backtracking inside token definitions
+@item Unwinds loops, and batches reads to minimize bounds checking
+@item Does all of that heavy lifting at compile time
+@end itemize")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-logos-derive-0.12
   (package
     (name "rust-logos-derive")
-- 
2.38.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: v2-0001-gnu-Add-rust-logos-derive-0.12.patch --]
[-- Type: text/x-patch; name=v2-0001-gnu-Add-rust-logos-derive-0.12.patch, Size: 1728 bytes --]

From 3e751d77b56a8b8b4a964125dab383a56313b528 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Wed, 16 Feb 2022 02:01:04 +0100
Subject: [PATCH v2 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 792779a28f..1cbe7d4798 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -30738,6 +30738,33 @@ (define-public rust-log-0.3
      `(#:cargo-inputs
        (("rust-log" ,rust-log-0.4))))))
 
+(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-loom-0.5
   (package
     (name "rust-loom")
-- 
2.38.1


      reply	other threads:[~2022-11-21 16:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21  9:48 [bug#54085] [PATCH 3/3] gnu: Add jless phodina via Guix-patches via
2022-02-21 13:24 ` Maxime Devos
2022-02-21 13:25 ` Maxime Devos
2022-02-21 13:27 ` Maxime Devos
2022-09-28 19:29   ` Maxim Cournoyer
2022-09-28 20:17     ` Maxime Devos
2022-11-21 16:14       ` phodina via Guix-patches via [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='U7rt2lb4CKr5h0RCxC0rVmWuLfmRrz5MZWq6kDYtmjmchz62tnupbhd1NfXT6oZnG4NTxRxv5LiNNiP2DIIyyiTlg4pnBplChRgTBse4nH0=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=54085@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    --cc=maximedevos@telenet.be \
    --cc=phodina@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).